WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
138131
File uploads not working with a custom NSURLProtocol
https://bugs.webkit.org/show_bug.cgi?id=138131
Summary
File uploads not working with a custom NSURLProtocol
Daniel
Reported
2014-10-28 06:41:25 PDT
The file upload using input type="file" or FormData API is not working when the URL is loaded using a custom NSURLProtocol. If a custom NSURLProtocol is handling an HTTP POST request, the request HTTPBodyStream is nil. This only happens if [WKBrowsingContextController registerSchemeForCustomProtocol:] is called for that protocol. If this method is not called, then the POST request is simply bypassing the custom protocol. This happens, because HTTP body stream (NSURLRequest.HTTPBodyStream) is not serialized in IPC messages when sending the request from the networking process to the UI process. See
http://trac.webkit.org/browser/trunk/Source/WebKit2/Shared/mac/WebCoreArgumentCodersMac.mm#L93
: [(NSMutableURLRequest *)requestToSerialize setHTTPBodyStream:nil]; This happens on iOS 8.1 [12B401]. It's also reproducible on the master branch ( 809db5f8edac632ec3332b43dc90795d96914440 ). This bug is related to
https://bugs.webkit.org/show_bug.cgi?id=137299
Attachments
Add attachment
proposed patch, testcase, etc.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug