Bug 152207

Summary: Use existing code for redirects when using NETWORK_SESSION
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch darin: review+

Description Alex Christensen 2015-12-11 18:47:08 PST
Use existing code for redirects when using NETWORK_SESSION
Comment 1 Alex Christensen 2015-12-11 18:47:23 PST
Created attachment 267213 [details]
Patch
Comment 2 Alex Christensen 2015-12-12 17:10:32 PST
Comment on attachment 267213 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=267213&action=review

> Source/WebKit2/NetworkProcess/NetworkLoad.cpp:169
>      sharedWillSendRedirectedRequest(request, response);
> -    completionHandler(request);
> +    ASSERT(!m_redirectCompletionHandler);
> +    m_redirectCompletionHandler = completionHandler;

I need to set m_redirectCompletionHandler before calling sharedWillSendRedirectedRequest
Comment 3 Alex Christensen 2015-12-12 17:14:24 PST
This fixes http/tests/cookies/set-cookie-on-redirect.html
rdar://problem/23860624
Comment 4 Alex Christensen 2015-12-12 17:17:04 PST
Created attachment 267248 [details]
Patch
Comment 5 Darin Adler 2015-12-13 13:44:21 PST
Comment on attachment 267248 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=267248&action=review

> Source/WebKit2/NetworkProcess/NetworkLoad.cpp:107
> +        m_task->cancel();

Incorrect indentation?

> Source/WebKit2/NetworkProcess/NetworkLoad.h:125
> +    RedirectCompletionHandler m_redirectCompletionHandler { nullptr };

std::function doesn't need nullptr initialization to be null
Comment 6 Alex Christensen 2015-12-14 13:54:10 PST
https://trac.webkit.org/changeset/194043