RESOLVED FIXED 175600
Fetch / Beacon: Use "application/octet-stream" Content-Type for payloads of type ArrayBuffer / ArrayBufferView
https://bugs.webkit.org/show_bug.cgi?id=175600
Summary Fetch / Beacon: Use "application/octet-stream" Content-Type for payloads of t...
Chris Dumez
Reported 2017-08-15 14:43:10 PDT
Use "application/octet-stream" Content-Type for payloads of type ArrayBuffer / ArrayBufferView in Fetch & Beacon. If we don't set a Content-Type header, our underlying network stack is going to add a "application/x-www-form-urlencoded" Content-Type header, which is worse.
Attachments
Patch (8.08 KB, patch)
2017-08-15 14:47 PDT, Chris Dumez
no flags
Patch (20.68 KB, patch)
2017-08-15 15:39 PDT, Chris Dumez
no flags
Patch (1020.50 KB, patch)
2017-08-15 16:01 PDT, Chris Dumez
no flags
Patch (21.36 KB, patch)
2017-08-15 17:41 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2017-08-15 14:47:56 PDT
Chris Dumez
Comment 2 2017-08-15 15:39:50 PDT
youenn fablet
Comment 3 2017-08-15 15:50:46 PDT
Comment on attachment 318186 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=318186&action=review > Source/WebCore/Modules/fetch/FetchBody.cpp:65 > + contentType = HTTPHeaderValues::octetStreamContentType(); Can we add a FIXME stating that we should remove it once all WebKit network stacks support sending no CT?
Chris Dumez
Comment 4 2017-08-15 16:01:16 PDT
youenn fablet
Comment 5 2017-08-15 16:17:04 PDT
Comment on attachment 318188 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=318188&action=review > Source/WebCore/Modules/fetch/FetchBody.cpp:65 > + // FIXME: We should not set a Content-Type here but we need to do this until our network stack s/our/all > Source/WebCore/Modules/fetch/FetchBody.cpp:72 > + // FIXME: We should not set a Content-Type here but we need to do this until our network stack ditto > LayoutTests/ChangeLog:13 > +2017-08-15 Chris Dumez <cdumez@apple.com> dup log and commit I guess
Chris Dumez
Comment 6 2017-08-15 17:41:39 PDT
WebKit Commit Bot
Comment 7 2017-08-15 18:23:54 PDT
Comment on attachment 318204 [details] Patch Clearing flags on attachment: 318204 Committed r220779: <http://trac.webkit.org/changeset/220779>
WebKit Commit Bot
Comment 8 2017-08-15 18:23:55 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 9 2017-08-15 18:25:30 PDT
Fujii Hironori
Comment 10 2017-08-16 01:23:08 PDT
3 LayoutTests of iOS port fail: http/tests/blink/sendbeacon/beacon-same-origin.html http/wpt/beacon/cors/cors-preflight-arraybufferview-failure.html http/wpt/beacon/cors/cors-preflight-arraybufferview-success.html https://build.webkit.org/results/Apple%20iOS%2010%20Simulator%20Release%20WK2%20(Tests)/r220779%20(3641)/results.html
Ryan Haddad
Comment 11 2017-08-16 08:36:21 PDT
(In reply to Fujii Hironori from comment #10) > 3 LayoutTests of iOS port fail: > > http/tests/blink/sendbeacon/beacon-same-origin.html > http/wpt/beacon/cors/cors-preflight-arraybufferview-failure.html > http/wpt/beacon/cors/cors-preflight-arraybufferview-success.html > > https://build.webkit.org/results/ > Apple%20iOS%2010%20Simulator%20Release%20WK2%20(Tests)/r220779%20(3641)/ > results.html The same 3 are failing on Sierra: https://build.webkit.org/results/Apple%20Sierra%20Release%20WK2%20(Tests)/r220795%20(3640)/results.html
Chris Dumez
Comment 12 2017-08-16 08:43:49 PDT
(In reply to Ryan Haddad from comment #11) > (In reply to Fujii Hironori from comment #10) > > 3 LayoutTests of iOS port fail: > > > > http/tests/blink/sendbeacon/beacon-same-origin.html > > http/wpt/beacon/cors/cors-preflight-arraybufferview-failure.html > > http/wpt/beacon/cors/cors-preflight-arraybufferview-success.html > > > > https://build.webkit.org/results/ > > Apple%20iOS%2010%20Simulator%20Release%20WK2%20(Tests)/r220779%20(3641)/ > > results.html > The same 3 are failing on Sierra: > > https://build.webkit.org/results/Apple%20Sierra%20Release%20WK2%20(Tests)/ > r220795%20(3640)/results.html Follow-up landed in <http://trac.webkit.org/changeset/220796>.
Note You need to log in before you can comment on or make changes to this bug.