Bug 173551 - [Cocoa] implement URLSession:task:needNewBodyStream: delegate method
Summary: [Cocoa] implement URLSession:task:needNewBodyStream: delegate method
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-06-19 09:46 PDT by Darin Adler
Modified: 2017-06-19 16:51 PDT (History)
4 users (show)

See Also:


Attachments
Patch (41.58 KB, patch)
2017-06-19 09:57 PDT, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (42.48 KB, patch)
2017-06-19 16:16 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.