Bug 162580

Summary: [WK2][NetworkSession] Ping requests should follow redirects if applicable
Product: WebKit Reporter: Daniel Bates <dbates>
Component: WebKit2Assignee: Daniel Bates <dbates>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, webkit-bug-importer
Priority: P2 Keywords: InRadar, WebExposed
Version: WebKit Local Build   
Hardware: Mac   
OS: macOS 10.12   
Bug Depends on: 162520    
Bug Blocks:    
Attachments:
Description Flags
Patch and Layout Tests achristensen: review+

Daniel Bates
Reported 2016-09-26 15:32:09 PDT
Ping requests do not follow redirects in WebKit2 with ENABLE(NETWORK_SESSION) enabled. With the exception of violation reports, ping requests should follow redirects per section "Hyperlink auditing" of the HTML standard: <https://html.spec.whatwg.org/multipage/semantics.html#hyperlink-auditing>.
Attachments
Patch and Layout Tests (27.21 KB, patch)
2016-09-27 16:41 PDT, Daniel Bates
achristensen: review+
Daniel Bates
Comment 1 2016-09-27 16:41:25 PDT
Created attachment 290020 [details] Patch and Layout Tests
Daniel Bates
Comment 2 2016-09-27 18:02:24 PDT
Patch does not apply because it depends on the change to class NetworkLoadParameters in the patch for bug #162520.
Alex Christensen
Comment 3 2016-09-27 21:42:37 PDT
Comment on attachment 290020 [details] Patch and Layout Tests View in context: https://bugs.webkit.org/attachment.cgi?id=290020&action=review > LayoutTests/http/tests/contentextensions/hide-on-ping-with-ping-that-redirects.html:30 > + // FIXME: Is there are better way to test that a redirect occurred? See my comment in https://bugs.webkit.org/show_bug.cgi?id=162520
Daniel Bates
Comment 4 2016-10-05 07:23:41 PDT
(In reply to comment #3) > Comment on attachment 290020 [details] > Patch and Layout Tests > > View in context: > https://bugs.webkit.org/attachment.cgi?id=290020&action=review > > > LayoutTests/http/tests/contentextensions/hide-on-ping-with-ping-that-redirects.html:30 > > + // FIXME: Is there are better way to test that a redirect occurred? > > See my comment in https://bugs.webkit.org/show_bug.cgi?id=162520 Filed bug #162968 to implement a polling approach.
Radar WebKit Bug Importer
Comment 5 2016-10-05 07:24:43 PDT
Daniel Bates
Comment 6 2016-10-05 07:29:14 PDT
Daniel Bates
Comment 7 2016-10-05 09:34:38 PDT
Renamed 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> and modified save-ping-and-redirect-to-save-ping.php to only append the query string if we have a non-empty query string to avoid appending a superfluous "?" on redirect when the query string is the empty string. Committed these changes in <http://trac.webkit.org/changeset/206813>.
Note You need to log in before you can comment on or make changes to this bug.