[Beacon][Cocoa] Beacon requests with BufferSource payload should not have a Content...
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 7 Oct 2017 00:25:00 +0000 (00:25 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 7 Oct 2017 00:25:00 +0000 (00:25 +0000)
commit09b75dc2e64d8c8536edb02e5e249962ac518bfa
tree6f731c041974ab9aa91eae249b3b011fc89a3124
parentfcfcc8750226a156e7fd325649adf39822da1f81
[Beacon][Cocoa] Beacon requests with BufferSource payload should not have a Content-Type HTTP header
https://bugs.webkit.org/show_bug.cgi?id=178027
<rdar://problem/34748470>

Reviewed by Youenn Fablet.

Source/WebCore/PAL:

Add new CFNetwork SPI.

* pal/spi/cf/CFNetworkSPI.h:

Source/WebKit:

Use new NSURLSessionConfiguration._suppressedAutoAddedHTTPHeaders CFNetwork SPI to
make sure that CFNetwork never adds a Content-Type HTTP headers to our requests
when we did not add one.

This is covered by the following tests on newer OSes:
- imported/w3c/web-platform-tests/beacon/headers/header-content-type.html
- http/tests/blink/sendbeacon/beacon-same-origin.html

* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223014 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/PAL/ChangeLog
Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm