Bug 173551

Summary: [Cocoa] implement URLSession:task:needNewBodyStream: delegate method
Product: WebKit Reporter: Darin Adler <darin>
Component: Page LoadingAssignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, beidson, commit-queue, darin
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Darin Adler 2017-06-19 09:46:18 PDT
[Cocoa] implement URLSession:task:needNewBodyStream: delegate method
Comment 1 Darin Adler 2017-06-19 09:57:58 PDT
Created attachment 313308 [details]
Patch
Comment 2 Darin Adler 2017-06-19 09:58:55 PDT
rdar://problem/32250512
Comment 3 Alex Christensen 2017-06-19 10:40:28 PDT
Comment on attachment 313308 [details]
Patch

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

Thanks, Darin!  I'm going to look into getting this into landing condition.

> Source/WebKit2/NetworkProcess/cocoa/NetworkSessionCocoa.mm:154
> +    // FIXME: Is this guaranteed to be correct even when redirects are involved?
> +    auto* body = networkDataTask->firstRequest().httpBody();

NSURLSessionTask has currentRequest
Comment 4 Alex Christensen 2017-06-19 14:01:49 PDT
Comment on attachment 313308 [details]
Patch

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

>> Source/WebKit2/NetworkProcess/cocoa/NetworkSessionCocoa.mm:154
>> +    auto* body = networkDataTask->firstRequest().httpBody();
> 
> NSURLSessionTask has currentRequest

Ah, we do want the http body of the first request, even if redirected.  This is an HTTP POST request.

> Source/WebKit2/NetworkProcess/cocoa/NetworkSessionCocoa.mm:160
> +    // FIXME: Is there a problem if some files are different in size since the original sizing?

I think if someone modifies a file as we are uploading it they're going to have a bad time anyways.
Comment 5 Alex Christensen 2017-06-19 16:16:17 PDT
Created attachment 313340 [details]
Patch
Comment 6 WebKit Commit Bot 2017-06-19 16:51:04 PDT
Comment on attachment 313340 [details]
Patch

Clearing flags on attachment: 313340

Committed r218517: <http://trac.webkit.org/changeset/218517>
Comment 7 WebKit Commit Bot 2017-06-19 16:51:06 PDT
All reviewed patches have been landed.  Closing bug.