Fetch: content-length header is being added to the safe-list
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Aug 2018 08:29:15 +0000 (08:29 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Aug 2018 08:29:15 +0000 (08:29 +0000)
commita5c0445813b96aa9235b06e2a74c78e17f32e84c
treed8574ee1d56952503a1728635f46ad3b5154b8f2
parent837a8c561bed4e62d4cfb36fa73f08ccbf559b0f
Fetch: content-length header is being added to the safe-list
https://bugs.webkit.org/show_bug.cgi?id=185473

Patch by Rob Buis <rbuis@igalia.com> on 2018-08-14
Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Sync with wpt change:
https://github.com/web-platform-tests/wpt/commit/407ecdff87af8aeceaa07cbc71aac9ec355d4334

* web-platform-tests/fetch/api/cors/cors-filtering-expected.txt:
* web-platform-tests/fetch/api/cors/cors-filtering-worker-expected.txt:
* web-platform-tests/fetch/api/cors/cors-filtering.js:

Source/WebCore:

Content-Length is a CORS-safelisted reponse header:
https://fetch.spec.whatwg.org/#cors-safelisted-response-header-name

Tests: web-platform-tests/fetch/api/cors/cors-filtering.html
       web-platform-tests/fetch/api/cors/cors-filtering-worker.html

* platform/network/HTTPParsers.cpp:
(WebCore::isCrossOriginSafeHeader):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@234840 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-filtering-expected.txt
LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-filtering-worker-expected.txt
LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-filtering.js
Source/WebCore/ChangeLog
Source/WebCore/platform/network/HTTPParsers.cpp