WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
211999
XMLHTTPRequest.send should not send Content-Type headers when Blob has no type
https://bugs.webkit.org/show_bug.cgi?id=211999
Summary
XMLHTTPRequest.send should not send Content-Type headers when Blob has no type
Rob Buis
Reported
2020-05-17 12:25:28 PDT
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
Attachments
Patch
(4.45 KB, patch)
2020-05-17 12:28 PDT
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Patch
(7.71 KB, patch)
2020-05-17 13:32 PDT
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Patch
(7.41 KB, patch)
2020-05-18 00:04 PDT
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Patch
(8.95 KB, patch)
2020-06-08 07:49 PDT
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Patch
(9.10 KB, patch)
2020-06-08 09:17 PDT
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Rob Buis
Comment 1
2020-05-17 12:28:37 PDT
Created
attachment 399599
[details]
Patch
Rob Buis
Comment 2
2020-05-17 13:32:08 PDT
Created
attachment 399604
[details]
Patch
Rob Buis
Comment 3
2020-05-18 00:04:48 PDT
Created
attachment 399625
[details]
Patch
Rob Buis
Comment 4
2020-06-08 07:49:10 PDT
Created
attachment 401335
[details]
Patch
Rob Buis
Comment 5
2020-06-08 09:17:37 PDT
Created
attachment 401344
[details]
Patch
EWS
Comment 6
2020-06-08 23:44:52 PDT
Committed
r262776
: <
https://trac.webkit.org/changeset/262776
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 401344
[details]
.
Radar WebKit Bug Importer
Comment 7
2020-06-08 23:45:20 PDT
<
rdar://problem/64152152
>
youenn fablet
Comment 8
2020-06-09 02:04:23 PDT
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?
youenn fablet
Comment 9
2020-06-09 02:04:25 PDT
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?
youenn fablet
Comment 10
2020-06-09 02:04:53 PDT
***
Bug 159210
has been marked as a duplicate of this bug. ***
Rob Buis
Comment 11
2020-06-09 02:30:18 PDT
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?
Alex Christensen
Comment 12
2020-06-09 08:20:29 PDT
NSURLConnection bugs have low likelihood of being fixed. This fix is fine.
Alex Christensen
Comment 13
2020-07-18 21:59:59 PDT
This broke an app. I fix the app in
https://bugs.webkit.org/show_bug.cgi?id=214528
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