Changeset 226162 in webkit
- Timestamp:
- Dec 19, 2017 5:15:58 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/http/wpt/fetch/fetch-as-blob.js
r216725 r226162 30 30 .then(function(blob) { 31 31 assert_equals(blob.type, ''); 32 assert_equals(req.headers.get('Content-Type'), '');32 assert_equals(req.headers.get('Content-Type'), null); 33 33 }); 34 34 }, 'MIME type for Blob'); -
trunk/LayoutTests/imported/w3c/ChangeLog
r226141 r226162 1 2017-12-19 Chris Dumez <cdumez@apple.com> 2 3 [Fetch] Extracting a body of type Blob should not set Content-Type to the empty string 4 https://bugs.webkit.org/show_bug.cgi?id=180991 5 6 Reviewed by Youenn Fablet. 7 8 Rebaseline WPT test now that it is passing. 9 10 * web-platform-tests/service-workers/service-worker/invalid-blobtype.https-expected.txt: 11 1 12 2017-12-19 Chris Dumez <cdumez@apple.com> 2 13 -
trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers.any-expected.txt
r220817 r226162 8 8 PASS Fetch with POST with FormData body 9 9 PASS Fetch with POST with URLSearchParams body 10 FAIL Fetch with POST with Blob body assert_equals: Request should have header content-type: null expected (object) null but got (string) " "10 FAIL Fetch with POST with Blob body assert_equals: Request should have header content-type: null expected (object) null but got (string) "application/x-www-form-urlencoded" 11 11 FAIL Fetch with POST with ArrayBuffer body assert_equals: Request should have header content-type: null expected (object) null but got (string) "application/x-www-form-urlencoded" 12 12 FAIL Fetch with POST with Uint8Array body assert_equals: Request should have header content-type: null expected (object) null but got (string) "application/x-www-form-urlencoded" -
trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers.any.worker-expected.txt
r220817 r226162 8 8 FAIL Fetch with POST with FormData body Can't find variable: FormData 9 9 PASS Fetch with POST with URLSearchParams body 10 FAIL Fetch with POST with Blob body assert_equals: Request should have header content-type: null expected (object) null but got (string) " "10 FAIL Fetch with POST with Blob body assert_equals: Request should have header content-type: null expected (object) null but got (string) "application/x-www-form-urlencoded" 11 11 FAIL Fetch with POST with ArrayBuffer body assert_equals: Request should have header content-type: null expected (object) null but got (string) "application/x-www-form-urlencoded" 12 12 FAIL Fetch with POST with Uint8Array body assert_equals: Request should have header content-type: null expected (object) null but got (string) "application/x-www-form-urlencoded" -
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/invalid-blobtype.https-expected.txt
r224218 r226162 1 1 2 PASS Verify the response of FetchEvent using XMLHttpRequest 2 3 3 FAIL Verify the response of FetchEvent using XMLHttpRequest assert_equals: expected "finish" but got "failure:Content-Type must be null."4 -
trunk/LayoutTests/platform/mac-sierra/imported/w3c/web-platform-tests/fetch/api/basic/request-headers.any-expected.txt
r222111 r226162 8 8 PASS Fetch with POST with FormData body 9 9 PASS Fetch with POST with URLSearchParams body 10 FAIL Fetch with POST with Blob body assert_equals: Request should have header content-type: null expected (object) null but got (string) " "10 FAIL Fetch with POST with Blob body assert_equals: Request should have header content-type: null expected (object) null but got (string) "application/x-www-form-urlencoded" 11 11 FAIL Fetch with POST with ArrayBuffer body assert_equals: Request should have header content-type: null expected (object) null but got (string) "application/x-www-form-urlencoded" 12 12 FAIL Fetch with POST with Uint8Array body assert_equals: Request should have header content-type: null expected (object) null but got (string) "application/x-www-form-urlencoded" -
trunk/LayoutTests/platform/mac-sierra/imported/w3c/web-platform-tests/fetch/api/basic/request-headers.any.worker-expected.txt
r222111 r226162 8 8 FAIL Fetch with POST with FormData body Can't find variable: FormData 9 9 PASS Fetch with POST with URLSearchParams body 10 FAIL Fetch with POST with Blob body assert_equals: Request should have header content-type: null expected (object) null but got (string) " "10 FAIL Fetch with POST with Blob body assert_equals: Request should have header content-type: null expected (object) null but got (string) "application/x-www-form-urlencoded" 11 11 FAIL Fetch with POST with ArrayBuffer body assert_equals: Request should have header content-type: null expected (object) null but got (string) "application/x-www-form-urlencoded" 12 12 FAIL Fetch with POST with Uint8Array body assert_equals: Request should have header content-type: null expected (object) null but got (string) "application/x-www-form-urlencoded" -
trunk/LayoutTests/platform/mac/imported/w3c/web-platform-tests/fetch/api/basic/request-headers.any-expected.txt
r222307 r226162 8 8 PASS Fetch with POST with FormData body 9 9 PASS Fetch with POST with URLSearchParams body 10 FAIL Fetch with POST with Blob body assert_equals: Request should have header content-type: null expected (object) null but got (string) " "10 FAIL Fetch with POST with Blob body assert_equals: Request should have header content-type: null expected (object) null but got (string) "application/x-www-form-urlencoded" 11 11 FAIL Fetch with POST with ArrayBuffer body assert_equals: Request should have header content-type: null expected (object) null but got (string) "application/x-www-form-urlencoded" 12 12 FAIL Fetch with POST with Uint8Array body assert_equals: Request should have header content-type: null expected (object) null but got (string) "application/x-www-form-urlencoded" -
trunk/LayoutTests/platform/mac/imported/w3c/web-platform-tests/fetch/api/basic/request-headers.any.worker-expected.txt
r222307 r226162 8 8 FAIL Fetch with POST with FormData body Can't find variable: FormData 9 9 PASS Fetch with POST with URLSearchParams body 10 FAIL Fetch with POST with Blob body assert_equals: Request should have header content-type: null expected (object) null but got (string) " "10 FAIL Fetch with POST with Blob body assert_equals: Request should have header content-type: null expected (object) null but got (string) "application/x-www-form-urlencoded" 11 11 FAIL Fetch with POST with ArrayBuffer body assert_equals: Request should have header content-type: null expected (object) null but got (string) "application/x-www-form-urlencoded" 12 12 FAIL Fetch with POST with Uint8Array body assert_equals: Request should have header content-type: null expected (object) null but got (string) "application/x-www-form-urlencoded" -
trunk/Source/WebCore/ChangeLog
r226161 r226162 1 2017-12-19 Chris Dumez <cdumez@apple.com> 2 3 [Fetch] Extracting a body of type Blob should not set Content-Type to the empty string 4 https://bugs.webkit.org/show_bug.cgi?id=180991 5 6 Reviewed by Youenn Fablet. 7 8 Extracting a body of type Blob should not set Content-Type to the empty string as per: 9 - https://fetch.spec.whatwg.org/#concept-bodyinit-extract 10 11 No new tests, rebaselined existing test. 12 13 * Modules/fetch/FetchBody.cpp: 14 (WebCore::FetchBody::extract): 15 1 16 2017-12-19 Commit Queue <commit-queue@webkit.org> 2 17 -
trunk/Source/WebCore/Modules/fetch/FetchBody.cpp
r225618 r226162 45 45 return WTF::switchOn(value, [&](RefPtr<Blob>& value) mutable { 46 46 Ref<const Blob> blob = value.releaseNonNull(); 47 contentType = blob->type(); 47 if (!blob->type().isEmpty()) 48 contentType = blob->type(); 48 49 return FetchBody(WTFMove(blob)); 49 50 }, [&](RefPtr<DOMFormData>& value) mutable {
Note: See TracChangeset
for help on using the changeset viewer.