RESOLVED FIXED Bug 178027
[Beacon][Cocoa] Beacon requests with BufferSource payload should not have a Content-Type HTTP header
https://bugs.webkit.org/show_bug.cgi?id=178027
Summary [Beacon][Cocoa] Beacon requests with BufferSource payload should not have a C...
Chris Dumez
Reported 2017-10-06 14:05:15 PDT
Beacon requests with BufferSource payload should not have a Content-Type HTTP header.
Attachments
Patch (3.71 KB, patch)
2017-10-06 14:09 PDT, Chris Dumez
no flags
Patch (3.79 KB, patch)
2017-10-06 14:29 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2017-10-06 14:05:31 PDT
Chris Dumez
Comment 2 2017-10-06 14:09:01 PDT
Chris Dumez
Comment 3 2017-10-06 14:09:21 PDT
--- /Volumes/Data/cdumez/WebKit/OpenSource/WebKitBuild/Debug/layout-test-results/imported/w3c/web-platform-tests/beacon/headers/header-content-type-expected.txt +++ /Volumes/Data/cdumez/WebKit/OpenSource/WebKitBuild/Debug/layout-test-results/imported/w3c/web-platform-tests/beacon/headers/header-content-type-actual.txt @@ -1,7 +1,7 @@ PASS Test content-type header for a body string -FAIL Test content-type header for a body ArrayBufferView assert_equals: Correct Content-Type header result expected "" but got "application/x-www-form-urlencoded" -FAIL Test content-type header for a body ArrayBuffer assert_equals: Correct Content-Type header result expected "" but got "application/x-www-form-urlencoded" +PASS Test content-type header for a body ArrayBufferView +PASS Test content-type header for a body ArrayBuffer PASS Test content-type header for a body Blob PASS Test content-type header for a body FormData PASS Test content-type header for a body URLSearchParams
Chris Dumez
Comment 4 2017-10-06 14:09:37 PDT
--- /Volumes/Data/cdumez/WebKit/OpenSource/WebKitBuild/Debug/layout-test-results/http/tests/blink/sendbeacon/beacon-same-origin-expected.txt +++ /Volumes/Data/cdumez/WebKit/OpenSource/WebKitBuild/Debug/layout-test-results/http/tests/blink/sendbeacon/beacon-same-origin-actual.txt @@ -16,12 +16,11 @@ Sending beacon with type: [object Uint32Array] PASS navigator.sendBeacon("resources/save-beacon.php?name=same-origin", payload); is true PASS Beacon sent successfully -PASS Content-Type: application/x-www-form-urlencoded PASS Origin: http://127.0.0.1:8000 PASS Referer: http://127.0.0.1:8000/blink/sendbeacon/beacon-same-origin.html PASS Request-Method: POST PASS Length: 40 -PASS Body: QAAAAEEAAABCAAAAQwAAAEQAAABFAAAARgAAAEcAAABIAAAASQAAAA== +PASS Body: @\0\0\0A\0\0\0B\0\0\0C\0\0\0D\0\0\0E\0\0\0F\0\0\0G\0\0\0H\0\0\0I PASS Sending beacon with type: [object Blob] PASS navigator.sendBeacon("resources/save-beacon.php?name=same-origin", payload); is true
Chris Dumez
Comment 5 2017-10-06 14:29:25 PDT
WebKit Commit Bot
Comment 6 2017-10-06 17:25:03 PDT
Comment on attachment 323045 [details] Patch Clearing flags on attachment: 323045 Committed r223014: <http://trac.webkit.org/changeset/223014>
WebKit Commit Bot
Comment 7 2017-10-06 17:25:05 PDT
All reviewed patches have been landed. Closing bug.
Andy Estes
Comment 8 2017-10-06 23:51:03 PDT
(In reply to WebKit Commit Bot from comment #6) > Comment on attachment 323045 [details] > Patch > > Clearing flags on attachment: 323045 > > Committed r223014: <http://trac.webkit.org/changeset/223014> This broke several of the Internal SDK builds, since -_suppressedAutoAddedHTTPHeaders isn't defined in most macOS 10.13 and iOS 11 Internal SDKs, and CFNetworkSPI.h only defines it for Public SDK builds.
Andy Estes
Comment 9 2017-10-07 00:02:51 PDT
Chris Dumez
Comment 10 2017-10-09 08:57:13 PDT
(In reply to Andy Estes from comment #8) > and CFNetworkSPI.h only defines it for Public SDK builds. Oh, I did not know this. Thanks for fixing.
Note You need to log in before you can comment on or make changes to this bug.