[Webkit-unassigned] [Bug 184987] [Cocoa] ResourceRequest constructors should retain 'isTopSite' (and other) state

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 25 14:32:32 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=184987

--- Comment #1 from Daniel Bates <dbates at webkit.org> ---
(In reply to Brent Fulgham from comment #0)
> When we convert a ResourceRequest to a cocoa type (e.g.,
> CFURLRequest/NSURLRequest) for Cocoa/CFNetwork API use, and then attempt to
> build new ResourceRequest objects (perhaps during redirect delegate calls
> from CFNetwork) using the constructors from CFURLRequest and NSURLRequest,
> we end up losing useful states (e.g., 'isTopSite()').
> 

As it turns out, we only set ResourceRequest::isTopSite() if the ResourceRequest::isSameSiteUnspecified(). So, the result you are seeing of ResourceRequest::isTopSite() returning false in -[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:] is because we conditionally set ResourceRequest::isTopSite(). Instead we should uncondtionally set ResourceRequest::isTopSite() whenever we are loading a main resource.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180425/547b0ee6/attachment-0001.html>


More information about the webkit-unassigned mailing list