Changeset 262776 in webkit
- Timestamp:
- Jun 8, 2020 11:44:48 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 2 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r262774 r262776 1 2020-06-08 Rob Buis <rbuis@igalia.com> 2 3 XMLHTTPRequest.send should not send Content-Type headers when Blob has no type 4 https://bugs.webkit.org/show_bug.cgi?id=211999 5 6 Reviewed by Alex Christensen. 7 8 Remove unneeded expectations. 9 10 * platform/ios/imported/w3c/web-platform-tests/xhr/send-blob-with-no-mime-type-expected.txt: Removed. 11 * platform/mac/imported/w3c/web-platform-tests/xhr/send-blob-with-no-mime-type-expected.txt: Removed. 12 1 13 2020-06-08 Simon Fraser <simon.fraser@apple.com> 2 14 -
trunk/LayoutTests/imported/w3c/ChangeLog
r262720 r262776 1 2020-06-08 Rob Buis <rbuis@igalia.com> 2 3 XMLHTTPRequest.send should not send Content-Type headers when Blob has no type 4 https://bugs.webkit.org/show_bug.cgi?id=211999 5 6 Reviewed by Alex Christensen. 7 8 Update improved test expectation. 9 10 * web-platform-tests/xhr/send-blob-with-no-mime-type-expected.txt: 11 1 12 2020-06-05 Sergio Villar Senin <svillar@igalia.com> 2 13 -
trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/send-blob-with-no-mime-type-expected.txt
r235354 r262776 1 1 2 FAIL Synchronous blob loading with no mime type [POST] assert_equals: expected "NO" but got "" 3 FAIL Asynchronous blob loading with no mime type [POST] assert_equals: expected "NO" but got "" 4 FAIL Synchronous blob loading with no mime type [PUT] assert_equals: expected "NO" but got "" 5 FAIL Asynchronous blob loading with no mime type [PUT] assert_equals: expected "NO" but got "" 6 FAIL Synchronous blob loading with invalid mime type [POST] assert_equals: expected "NO" but got "" 7 FAIL Asynchronous blob loading with invalid mime type [POST] assert_equals: expected "NO" but got "" 8 FAIL Synchronous blob loading with invalid mime type [PUT] assert_equals: expected "NO" but got "" 9 FAIL Asynchronous blob loading with invalid mime type [PUT] assert_equals: expected "NO" but got "" 2 PASS Synchronous blob loading with no mime type [POST] 3 PASS Asynchronous blob loading with no mime type [POST] 4 PASS Synchronous blob loading with no mime type [PUT] 5 PASS Asynchronous blob loading with no mime type [PUT] 6 PASS Synchronous blob loading with invalid mime type [POST] 7 PASS Asynchronous blob loading with invalid mime type [POST] 8 PASS Synchronous blob loading with invalid mime type [PUT] 9 PASS Asynchronous blob loading with invalid mime type [PUT] 10 10 -
trunk/Source/WebCore/ChangeLog
r262774 r262776 1 2020-06-08 Rob Buis <rbuis@igalia.com> 2 3 XMLHTTPRequest.send should not send Content-Type headers when Blob has no type 4 https://bugs.webkit.org/show_bug.cgi?id=211999 5 6 Reviewed by Alex Christensen. 7 8 XMLHTTPRequest.send should not send Content-Type headers when Blob has no type [1, 2]. 9 This behavior overrides the behavior of the File API spec [3]. 10 11 Behavior matches Firefox and Chrome. 12 13 Test: imported/w3c/web-platform-tests/xhr/send-blob-with-no-mime-type.html 14 15 [1] https://xhr.spec.whatwg.org/#dom-xmlhttprequest-send 16 [2] https://fetch.spec.whatwg.org/#concept-bodyinit-extract 17 [3] http://dev.w3.org/2006/webapi/FileAPI/#dfn-type 18 19 * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm: 20 (-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]): 21 * xml/XMLHttpRequest.cpp: 22 (WebCore::XMLHttpRequest::send): 23 1 24 2020-06-08 Simon Fraser <simon.fraser@apple.com> 2 25 -
trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm
r256632 r262776 122 122 123 123 // See <rdar://problem/5380697>. This is a workaround for a behavior change in CFNetwork where willSendRequest gets called more often. 124 if (!redirectResponse) 124 if (!redirectResponse) { 125 // CFNetwork will add "application/x-www-form-urlencoded" content-type for POST, even if no Content-Type was specified, remove it in that case. 126 if (equalLettersIgnoringASCIICase(m_handle->firstRequest().httpMethod(), "post") && !m_handle->firstRequest().hasHTTPHeaderField(HTTPHeaderName::ContentType)) { 127 NSMutableURLRequest *modifiedRequest = [newRequest mutableCopy]; 128 [modifiedRequest setValue:nil forHTTPHeaderField:@"Content-Type"]; 129 return modifiedRequest; 130 } 125 131 return newRequest; 132 } 126 133 127 134 #if !LOG_DISABLED -
trunk/Source/WebCore/xml/XMLHttpRequest.cpp
r262369 r262776 531 531 if (!blobType.isEmpty() && isValidContentType(blobType)) 532 532 m_requestHeaders.set(HTTPHeaderName::ContentType, blobType); 533 else {534 // From FileAPI spec, whenever media type cannot be determined, empty string must be returned.535 m_requestHeaders.set(HTTPHeaderName::ContentType, emptyString());536 }537 533 } 538 534
Note: See TracChangeset
for help on using the changeset viewer.