Changeset 201557 in webkit
- Timestamp:
- Jun 1, 2016 10:14:09 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r201554 r201557 1 2016-06-01 Nael Ouedraogo <nael.ouedraogo@crf.canon.fr> 2 3 POST request on a blob resource should return a "network error" instead of HTTP 500 response 4 https://bugs.webkit.org/show_bug.cgi?id=158022 5 6 Reviewed by Alex Christensen. 7 8 Make sure response to XHR request on blob is correct. 9 10 * fast/files/xhr-blob-request-expected.txt: Added. 11 * fast/files/xhr-blob-request.html: Added. 12 1 13 2016-06-01 Javier Fernandez <jfernandez@igalia.com> 2 14 -
trunk/LayoutTests/imported/w3c/ChangeLog
r201555 r201557 1 2016-06-01 Nael Ouedraogo <nael.ouedraogo@crf.canon.fr> 2 3 POST request on a blob resource should return a "network error" instead of HTTP 500 response 4 https://bugs.webkit.org/show_bug.cgi?id=158022 5 6 Reviewed by Alex Christensen. 7 8 Make sure request on blob resource is correct. 9 10 * web-platform-tests/fetch/api/basic/scheme-blob-expected.txt: 11 * web-platform-tests/fetch/api/basic/scheme-blob-worker-expected.txt: 12 * web-platform-tests/fetch/api/basic/scheme-blob.js: Add new tests with several HTTP methods. 13 1 14 2016-06-01 Youenn Fablet <youenn.fablet@crf.canon.fr> 2 15 -
trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob-expected.txt
r198888 r201557 2 2 PASS Fetching [GET] URL.createObjectURL(blob) is OK 3 3 PASS Fetching [GET] blob:http://www.localhost:8800/ is KO 4 FAIL Fetching [POST] URL.createObjectURL(blob) is KO assert_unreached: Should have rejected. Reached unreachable code 4 PASS Fetching [POST] URL.createObjectURL(blob) is KO 5 PASS Fetching [OPTIONS] URL.createObjectURL(blob) is KO 6 PASS Fetching [HEAD] URL.createObjectURL(blob) is KO 7 PASS Fetching [PUT] URL.createObjectURL(blob) is KO 8 PASS Fetching [DELETE] URL.createObjectURL(blob) is KO 9 PASS Fetching [INVALID] URL.createObjectURL(blob) is KO 5 10 -
trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob-worker-expected.txt
r198891 r201557 2 2 PASS Fetching [GET] URL.createObjectURL(blob) is OK 3 3 PASS Fetching [GET] blob:http://www.localhost:8800/ is KO 4 FAIL Fetching [POST] URL.createObjectURL(blob) is KO assert_unreached: Should have rejected. Reached unreachable code 4 PASS Fetching [POST] URL.createObjectURL(blob) is KO 5 PASS Fetching [OPTIONS] URL.createObjectURL(blob) is KO 6 PASS Fetching [HEAD] URL.createObjectURL(blob) is KO 7 PASS Fetching [PUT] URL.createObjectURL(blob) is KO 8 PASS Fetching [DELETE] URL.createObjectURL(blob) is KO 9 PASS Fetching [INVALID] URL.createObjectURL(blob) is KO 5 10 -
trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob.js
r198888 r201557 33 33 checkKoUrl("blob:http://{{domains[www]}}:{{ports[http][0]}}/", "GET", 34 34 "Fetching [GET] blob:http://{{domains[www]}}:{{ports[http][0]}}/ is KO"); 35 checkKoUrl(URL.createObjectURL(blob2), "POST", 36 "Fetching [POST] URL.createObjectURL(blob) is KO"); 35 36 var invalidRequestMethods = [ 37 "POST", 38 "OPTIONS", 39 "HEAD", 40 "PUT", 41 "DELETE", 42 "INVALID", 43 ]; 44 invalidRequestMethods.forEach(function(method) { 45 checkKoUrl(URL.createObjectURL(blob2), method, "Fetching [" + method + "] URL.createObjectURL(blob) is KO"); 46 }); 37 47 38 48 done(); -
trunk/Source/WebCore/ChangeLog
r201556 r201557 1 2016-06-01 Nael Ouedraogo <nael.ouedraogo@crf.canon.fr> 2 3 POST request on a blob resource should return a "network error" instead of HTTP 500 response 4 https://bugs.webkit.org/show_bug.cgi?id=158022 5 6 Reviewed by Alex Christensen. 7 8 Not allowed HTTP method is notified as failed in BlobResourceHandle as per Fetch 9 specification (5.2 Basic fetch). This behavior is observable in fetch WPT tests. 10 11 The behavior of XHR is slightly changed for asynchronous request on a blob resource with not 12 allowed or invalid HTTP methods. The onError callback is called instead of throwing an 13 exception as per XHR specification (https://xhr.spec.whatwg.org/#request-error-steps). 14 15 WPT tests expected results have been updated for fetch tests on blob resources which are 16 now correct. 17 18 Test: fast/files/xhr-blob-request.html ensures XHR response to requests on a blob resource is 19 correct. 20 21 * platform/network/BlobResourceHandle.cpp: 22 (WebCore::BlobResourceHandle::doStart): 23 * xml/XMLHttpRequest.cpp: 24 (WebCore::XMLHttpRequest::createRequest): 25 1 26 2016-06-01 Youenn Fablet <youenn.fablet@crf.canon.fr> 2 27 -
trunk/Source/WebCore/platform/network/BlobResourceHandle.cpp
r201482 r201557 203 203 204 204 if (!equalLettersIgnoringASCIICase(firstRequest().httpMethod(), "get")) { 205 m_errorCode = methodNotAllowed; 206 notifyResponse(); 205 notifyFail(methodNotAllowed); 207 206 return; 208 207 } -
trunk/Source/WebCore/xml/XMLHttpRequest.cpp
r200895 r201557 669 669 { 670 670 // Only GET request is supported for blob URL. 671 if ( m_url.protocolIsBlob() && m_method != "GET") {671 if (!m_async && m_url.protocolIsBlob() && m_method != "GET") { 672 672 ec = NETWORK_ERR; 673 673 return;
Note: See TracChangeset
for help on using the changeset viewer.