[WK2][NetworkSession] Ping requests should follow redirects if applicable
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Oct 2016 16:29:37 +0000 (16:29 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Oct 2016 16:29:37 +0000 (16:29 +0000)
https://bugs.webkit.org/show_bug.cgi?id=162580
<rdar://problem/28631274>

Rename test anchor-ping-and-do-not-follow-redirect-when-sending-ping.html to anchor-ping-and-follow-redirect-when-sending-ping.html
to reflect what it is actually testing - that we follow a redirect when sending a ping for a <a ping>.

* http/tests/navigation/ping-attribute/anchor-ping-and-follow-redirect-when-sending-ping-expected.txt: Renamed from LayoutTests/http/tests/navigation/ping-attribute/anchor-ping-and-do-not-follow-redirect-when-sending-ping-expected.txt.
* http/tests/navigation/ping-attribute/anchor-ping-and-follow-redirect-when-sending-ping.html: Renamed from LayoutTests/http/tests/navigation/ping-attribute/anchor-ping-and-do-not-follow-redirect-when-sending-ping.html.
* http/tests/navigation/resources/save-ping-and-redirect-to-save-ping.php: Only append the query string
if we have a non-empty query string to avoid appending a superfluous "?" on redirect.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@206813 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/http/tests/navigation/ping-attribute/anchor-ping-and-follow-redirect-when-sending-ping-expected.txt [moved from LayoutTests/http/tests/navigation/ping-attribute/anchor-ping-and-do-not-follow-redirect-when-sending-ping-expected.txt with 79% similarity]
LayoutTests/http/tests/navigation/ping-attribute/anchor-ping-and-follow-redirect-when-sending-ping.html [moved from LayoutTests/http/tests/navigation/ping-attribute/anchor-ping-and-do-not-follow-redirect-when-sending-ping.html with 100% similarity]
LayoutTests/http/tests/navigation/resources/save-ping-and-redirect-to-save-ping.php

index fb74aa0..c5b88f3 100644 (file)
@@ -4,6 +4,20 @@
         https://bugs.webkit.org/show_bug.cgi?id=162580
         <rdar://problem/28631274>
 
+        Rename test anchor-ping-and-do-not-follow-redirect-when-sending-ping.html to anchor-ping-and-follow-redirect-when-sending-ping.html
+        to reflect what it is actually testing - that we follow a redirect when sending a ping for a <a ping>.
+
+        * http/tests/navigation/ping-attribute/anchor-ping-and-follow-redirect-when-sending-ping-expected.txt: Renamed from LayoutTests/http/tests/navigation/ping-attribute/anchor-ping-and-do-not-follow-redirect-when-sending-ping-expected.txt.
+        * http/tests/navigation/ping-attribute/anchor-ping-and-follow-redirect-when-sending-ping.html: Renamed from LayoutTests/http/tests/navigation/ping-attribute/anchor-ping-and-do-not-follow-redirect-when-sending-ping.html.
+        * http/tests/navigation/resources/save-ping-and-redirect-to-save-ping.php: Only append the query string
+        if we have a non-empty query string to avoid appending a superfluous "?" on redirect.
+
+2016-10-05  Daniel Bates  <dabates@apple.com>
+
+        [WK2][NetworkSession] Ping requests should follow redirects if applicable
+        https://bugs.webkit.org/show_bug.cgi?id=162580
+        <rdar://problem/28631274>
+
         Reviewed by Alex Christensen.
 
         Add tests to ensure that we follow redirects for ping requests that are initiated as part
@@ -1,7 +1,7 @@
 Ping sent successfully
 CONTENT_TYPE: text/ping
 HTTP_HOST: 127.0.0.1:8000
-HTTP_PING_FROM: http://127.0.0.1:8000/navigation/ping-attribute/anchor-ping-and-do-not-follow-redirect-when-sending-ping.html
+HTTP_PING_FROM: http://127.0.0.1:8000/navigation/ping-attribute/anchor-ping-and-follow-redirect-when-sending-ping.html
 HTTP_PING_TO: javascript:checkPing()
 REQUEST_METHOD: POST
 REQUEST_URI: /navigation/resources/save-Ping.php
index f2bf718..2fc6a2b 100644 (file)
@@ -5,5 +5,5 @@ $DO_NOT_CLEAR_COOKIES = true; // Used by save-Ping.php
 require_once 'save-Ping.php';
 
 header('HTTP/1.1 307');
-header('Location: save-Ping.php' . (isset($_SERVER['QUERY_STRING']) ? '?' . $_SERVER['QUERY_STRING'] : ''));
+header('Location: save-Ping.php' . (!empty($_SERVER['QUERY_STRING']) ? '?' . $_SERVER['QUERY_STRING'] : ''));
 ?>