XMLHTTPRequest.send should not send Content-Type headers when Blob has no type [1, 2]. This behavior overrides the behavior of the File API spec [3]. [1] https://xhr.spec.whatwg.org/#dom-xmlhttprequest-send [2] https://fetch.spec.whatwg.org/#concept-bodyinit-extract [3] http://dev.w3.org/2006/webapi/FileAPI/#dfn-type
Created attachment 399599 [details] Patch
Created attachment 399604 [details] Patch
Created attachment 399625 [details] Patch
Created attachment 401335 [details] Patch
Created attachment 401344 [details] Patch
Committed r262776: <https://trac.webkit.org/changeset/262776> All reviewed patches have been landed. Closing bug and clearing flags on attachment 401344 [details].
<rdar://problem/64152152>
Comment on attachment 401344 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=401344&action=review > Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:125 > + // CFNetwork will add "application/x-www-form-urlencoded" content-type for POST, even if no Content-Type was specified, remove it in that case. If that is true, CFNetwork should probably fix that issue as well. Is there a test that is exhibiting that issue?
*** Bug 159210 has been marked as a duplicate of this bug. ***
Comment on attachment 401344 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=401344&action=review >>> Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:125 >>> + // CFNetwork will add "application/x-www-form-urlencoded" content-type for POST, even if no Content-Type was specified, remove it in that case. >> >> If that is true, CFNetwork should probably fix that issue as well. >> Is there a test that is exhibiting that issue? > > If that is true, CFNetwork should probably fix that issue as well. > Is there a test that is exhibiting that issue? To be clear, this remark is only true for WK1, WK2 is fine. Maybe it is the difference of using NSURLConnection for WK1 versus NSURLSession? The test is imported/w3c/web-platform-tests/xhr/send-blob-with-no-mime-type.html, or did I misunderstand your question?
NSURLConnection bugs have low likelihood of being fixed. This fix is fine.
This broke an app. I fix the app in https://bugs.webkit.org/show_bug.cgi?id=214528