<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[201557] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/201557">201557</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-06-01 10:14:09 -0700 (Wed, 01 Jun 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>POST request on a blob resource should return a &quot;network error&quot; instead of HTTP 500 response
https://bugs.webkit.org/show_bug.cgi?id=158022

Patch by Nael Ouedraogo &lt;nael.ouedraogo@crf.canon.fr&gt; on 2016-06-01
Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Make sure request on blob resource is correct.

* web-platform-tests/fetch/api/basic/scheme-blob-expected.txt:
* web-platform-tests/fetch/api/basic/scheme-blob-worker-expected.txt:
* web-platform-tests/fetch/api/basic/scheme-blob.js: Add new tests with several HTTP methods.

Source/WebCore:

Not allowed HTTP method is notified as failed in BlobResourceHandle as per Fetch
specification (5.2 Basic fetch). This behavior is observable in fetch WPT tests.

The behavior of XHR is slightly changed for asynchronous request on a blob resource with not
allowed or invalid HTTP methods. The onError callback is called instead of throwing an
exception as per XHR specification (https://xhr.spec.whatwg.org/#request-error-steps).

WPT tests expected results have been updated for fetch tests on blob resources which are
now correct.

Test: fast/files/xhr-blob-request.html ensures XHR response to requests on a blob resource is
correct.

* platform/network/BlobResourceHandle.cpp:
(WebCore::BlobResourceHandle::doStart):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::createRequest):

LayoutTests:

Make sure response to XHR request on blob is correct.

* fast/files/xhr-blob-request-expected.txt: Added.
* fast/files/xhr-blob-request.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemeblobexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemeblobworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob-worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemeblobjs">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob.js</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkBlobResourceHandlecpp">trunk/Source/WebCore/platform/network/BlobResourceHandle.cpp</a></li>
<li><a href="#trunkSourceWebCorexmlXMLHttpRequestcpp">trunk/Source/WebCore/xml/XMLHttpRequest.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastfilesxhrblobrequestexpectedtxt">trunk/LayoutTests/fast/files/xhr-blob-request-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastfilesxhrblobrequesthtml">trunk/LayoutTests/fast/files/xhr-blob-request.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (201556 => 201557)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-06-01 16:58:08 UTC (rev 201556)
+++ trunk/LayoutTests/ChangeLog        2016-06-01 17:14:09 UTC (rev 201557)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-06-01  Nael Ouedraogo  &lt;nael.ouedraogo@crf.canon.fr&gt;
+
+        POST request on a blob resource should return a &quot;network error&quot; instead of HTTP 500 response
+        https://bugs.webkit.org/show_bug.cgi?id=158022
+
+        Reviewed by Alex Christensen.
+
+        Make sure response to XHR request on blob is correct.
+
+        * fast/files/xhr-blob-request-expected.txt: Added.
+        * fast/files/xhr-blob-request.html: Added.
+
</ins><span class="cx"> 2016-06-01  Javier Fernandez  &lt;jfernandez@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed GTK+ gardening. Rebaseline several tests after r201397.
</span></span></pre></div>
<a id="trunkLayoutTestsfastfilesxhrblobrequestexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/files/xhr-blob-request-expected.txt (0 => 201557)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/files/xhr-blob-request-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/files/xhr-blob-request-expected.txt        2016-06-01 17:14:09 UTC (rev 201557)
</span><span class="lines">@@ -0,0 +1,19 @@
</span><ins>+
+PASS Exception should be thrown for TRACE request 
+PASS Exception should be thrown for TRACK request 
+PASS Exception should be thrown for CONNECT request 
+PASS Synchronous XHR request should succeed with GET 
+PASS Synchronous XHR request should throw exception with OPTIONS 
+PASS Synchronous XHR request should throw exception with HEAD 
+PASS Synchronous XHR request should throw exception with PUT 
+PASS Synchronous XHR request should throw exception with DELETE 
+PASS Synchronous XHR request should throw exception with INVALID 
+PASS Synchronous XHR request should throw exception with POST 
+PASS Asynchronous XHR request should succeed with GET 
+PASS Asynchronous XHR request should calls onError callback with OPTIONS 
+PASS Asynchronous XHR request should calls onError callback with HEAD 
+PASS Asynchronous XHR request should calls onError callback with PUT 
+PASS Asynchronous XHR request should calls onError callback with DELETE 
+PASS Asynchronous XHR request should calls onError callback with INVALID 
+PASS Asynchronous XHR request should calls onError callback with POST 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastfilesxhrblobrequesthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/files/xhr-blob-request.html (0 => 201557)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/files/xhr-blob-request.html                                (rev 0)
+++ trunk/LayoutTests/fast/files/xhr-blob-request.html        2016-06-01 17:14:09 UTC (rev 201557)
</span><span class="lines">@@ -0,0 +1,129 @@
</span><ins>+&lt;html&gt;
+  &lt;head&gt;
+    &lt;meta charset=&quot;utf-8&quot;&gt;
+    &lt;title&gt;Test a XMLHttpRequest request of a Blob URL responds appropriately.&lt;/title&gt;
+    &lt;meta name=&quot;author&quot; title=&quot;Canon Research France&quot; href=&quot;https://www.crf.canon.fr&quot;&gt;
+    &lt;script src=&quot;../../resources/testharness.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;script&gt;
+var array = new Int8Array([0, 1, 2, 3]);
+var blob = new Blob(array);
+var url = URL.createObjectURL(blob);
+
+function test_allowed_method_sync(method) {
+    test (() =&gt; {
+        var req = new XMLHttpRequest;
+        var onLoad = false;
+        req.open(method, url, false);
+
+        req.onerror = function(evt) {
+            assert_unreached('Error callback called for synchronous ' + method + ' XHR');
+        }
+
+        req.onload = function() {
+            onLoad = true;
+        }
+
+        try {
+            req.send();
+            assert_true(onLoad);
+        }
+        catch(e) {
+            assert_unreached('Exception thrown for synchronous ' + method + ' XHR');
+        }
+    }, 'Synchronous XHR request should succeed with ' + method);
+}
+
+function test_notAllowed_method_sync(method) {
+    test (() =&gt; {
+        var req = new XMLHttpRequest;
+        var onError = false;
+        req.open(method, url, false);
+
+        req.onerror = function(evt) {
+            onError = true;
+        }
+
+        req.onload = function() {
+            assert_unreached('Exception should be thrown for synchronous ' + method + ' XHR');
+        }
+
+        assert_throws('NetworkError', () =&gt; { req.send(); }, 'Exception thrown for synchronous ' + method + ' XHR');
+
+        assert_false(onError, 'Error callback is called');
+    }, 'Synchronous XHR request should throw exception with ' + method);
+}
+
+function create_async_xhr_promise(method) {
+    return new Promise(function(resolve) {
+        var req = new XMLHttpRequest;
+        var status = { &quot;onError&quot; : false, &quot;onLoad&quot; : false };
+
+        req.open(method, url, true);
+
+        req.onerror = function(evt) {
+            status.onError = true;
+        }
+
+        req.onload = function() {
+            status.onLoad = true;
+        }
+
+        req.onloadend = function() {
+            resolve(status);
+        }
+
+        try {
+            req.send();
+        }
+        catch(e) {
+            assert_unreached('Exception thrown');
+        }
+    });
+}
+
+function test_method_async(method, shouldLoad) {
+    promise_test(() =&gt; {
+        return create_async_xhr_promise(method).then((res) =&gt; {
+            assert_equals(res.onError, !shouldLoad, 'XHR request calls onError callback');
+            assert_equals(res.onLoad, shouldLoad, 'XHR request is loaded');
+        })
+    }, 'Asynchronous XHR request should ' + (shouldLoad ? 'succeed' : 'calls onError callback') + ' with ' + method);
+}
+
+
+
+function test_forbidden_method(request) {
+    test(() =&gt; {
+        assert_throws('SecurityError', () =&gt; {
+            var req = new XMLHttpRequest;
+            req.open(request, url);
+        })
+    }, 'Exception should be thrown for ' + request + ' request');
+}
+test_forbidden_method('TRACE');
+test_forbidden_method('TRACK');
+test_forbidden_method('CONNECT');
+
+test_allowed_method_sync('GET');
+test_notAllowed_method_sync('OPTIONS');
+test_notAllowed_method_sync('HEAD');
+test_notAllowed_method_sync('PUT');
+test_notAllowed_method_sync('DELETE');
+test_notAllowed_method_sync('INVALID');
+test_notAllowed_method_sync('POST');
+
+test_method_async('GET', true);
+test_method_async('OPTIONS',false);
+test_method_async('HEAD',false);
+test_method_async('PUT',false);
+test_method_async('DELETE',false);
+test_method_async('INVALID',false);
+test_method_async('POST',false);
+done()
+
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (201556 => 201557)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog        2016-06-01 16:58:08 UTC (rev 201556)
+++ trunk/LayoutTests/imported/w3c/ChangeLog        2016-06-01 17:14:09 UTC (rev 201557)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2016-06-01  Nael Ouedraogo  &lt;nael.ouedraogo@crf.canon.fr&gt;
+
+        POST request on a blob resource should return a &quot;network error&quot; instead of HTTP 500 response
+        https://bugs.webkit.org/show_bug.cgi?id=158022
+
+        Reviewed by Alex Christensen.
+
+        Make sure request on blob resource is correct.
+
+        * web-platform-tests/fetch/api/basic/scheme-blob-expected.txt:
+        * web-platform-tests/fetch/api/basic/scheme-blob-worker-expected.txt:
+        * web-platform-tests/fetch/api/basic/scheme-blob.js: Add new tests with several HTTP methods.
+
</ins><span class="cx"> 2016-06-01  Youenn Fablet  &lt;youenn.fablet@crf.canon.fr&gt;
</span><span class="cx"> 
</span><span class="cx">         Close wptserve response file handles explicitly
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemeblobexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob-expected.txt (201556 => 201557)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob-expected.txt        2016-06-01 16:58:08 UTC (rev 201556)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob-expected.txt        2016-06-01 17:14:09 UTC (rev 201557)
</span><span class="lines">@@ -1,5 +1,10 @@
</span><span class="cx"> 
</span><span class="cx"> PASS Fetching [GET] URL.createObjectURL(blob) is OK 
</span><span class="cx"> PASS Fetching [GET] blob:http://www.localhost:8800/ is KO 
</span><del>-FAIL Fetching [POST] URL.createObjectURL(blob) is KO assert_unreached: Should have rejected. Reached unreachable code
</del><ins>+PASS Fetching [POST] URL.createObjectURL(blob) is KO 
+PASS Fetching [OPTIONS] URL.createObjectURL(blob) is KO 
+PASS Fetching [HEAD] URL.createObjectURL(blob) is KO 
+PASS Fetching [PUT] URL.createObjectURL(blob) is KO 
+PASS Fetching [DELETE] URL.createObjectURL(blob) is KO 
+PASS Fetching [INVALID] URL.createObjectURL(blob) is KO 
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemeblobworkerexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob-worker-expected.txt (201556 => 201557)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob-worker-expected.txt        2016-06-01 16:58:08 UTC (rev 201556)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob-worker-expected.txt        2016-06-01 17:14:09 UTC (rev 201557)
</span><span class="lines">@@ -1,5 +1,10 @@
</span><span class="cx"> 
</span><span class="cx"> PASS Fetching [GET] URL.createObjectURL(blob) is OK 
</span><span class="cx"> PASS Fetching [GET] blob:http://www.localhost:8800/ is KO 
</span><del>-FAIL Fetching [POST] URL.createObjectURL(blob) is KO assert_unreached: Should have rejected. Reached unreachable code
</del><ins>+PASS Fetching [POST] URL.createObjectURL(blob) is KO 
+PASS Fetching [OPTIONS] URL.createObjectURL(blob) is KO 
+PASS Fetching [HEAD] URL.createObjectURL(blob) is KO 
+PASS Fetching [PUT] URL.createObjectURL(blob) is KO 
+PASS Fetching [DELETE] URL.createObjectURL(blob) is KO 
+PASS Fetching [INVALID] URL.createObjectURL(blob) is KO 
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemeblobjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob.js (201556 => 201557)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob.js        2016-06-01 16:58:08 UTC (rev 201556)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob.js        2016-06-01 17:14:09 UTC (rev 201557)
</span><span class="lines">@@ -32,7 +32,17 @@
</span><span class="cx"> var blob2 = new Blob([&quot;Blob's data&quot;], { &quot;type&quot; : &quot;text/plain&quot; });
</span><span class="cx"> checkKoUrl(&quot;blob:http://{{domains[www]}}:{{ports[http][0]}}/&quot;, &quot;GET&quot;,
</span><span class="cx">           &quot;Fetching [GET] blob:http://{{domains[www]}}:{{ports[http][0]}}/ is KO&quot;);
</span><del>-checkKoUrl(URL.createObjectURL(blob2), &quot;POST&quot;,
-           &quot;Fetching [POST] URL.createObjectURL(blob) is KO&quot;);
</del><span class="cx"> 
</span><ins>+var invalidRequestMethods = [
+  &quot;POST&quot;,
+  &quot;OPTIONS&quot;,
+  &quot;HEAD&quot;,
+  &quot;PUT&quot;,
+  &quot;DELETE&quot;,
+  &quot;INVALID&quot;,
+];
+invalidRequestMethods.forEach(function(method) {
+  checkKoUrl(URL.createObjectURL(blob2), method, &quot;Fetching [&quot; + method + &quot;] URL.createObjectURL(blob) is KO&quot;);
+});
+
</ins><span class="cx"> done();
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (201556 => 201557)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-06-01 16:58:08 UTC (rev 201556)
+++ trunk/Source/WebCore/ChangeLog        2016-06-01 17:14:09 UTC (rev 201557)
</span><span class="lines">@@ -1,3 +1,28 @@
</span><ins>+2016-06-01  Nael Ouedraogo  &lt;nael.ouedraogo@crf.canon.fr&gt;
+
+        POST request on a blob resource should return a &quot;network error&quot; instead of HTTP 500 response
+        https://bugs.webkit.org/show_bug.cgi?id=158022
+
+        Reviewed by Alex Christensen.
+
+        Not allowed HTTP method is notified as failed in BlobResourceHandle as per Fetch
+        specification (5.2 Basic fetch). This behavior is observable in fetch WPT tests.
+
+        The behavior of XHR is slightly changed for asynchronous request on a blob resource with not
+        allowed or invalid HTTP methods. The onError callback is called instead of throwing an
+        exception as per XHR specification (https://xhr.spec.whatwg.org/#request-error-steps).
+
+        WPT tests expected results have been updated for fetch tests on blob resources which are
+        now correct.
+
+        Test: fast/files/xhr-blob-request.html ensures XHR response to requests on a blob resource is
+        correct.
+
+        * platform/network/BlobResourceHandle.cpp:
+        (WebCore::BlobResourceHandle::doStart):
+        * xml/XMLHttpRequest.cpp:
+        (WebCore::XMLHttpRequest::createRequest):
+
</ins><span class="cx"> 2016-06-01  Youenn Fablet  &lt;youenn.fablet@crf.canon.fr&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove allocation of SubresourceLoader::m_requestCountTracker
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkBlobResourceHandlecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/BlobResourceHandle.cpp (201556 => 201557)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/BlobResourceHandle.cpp        2016-06-01 16:58:08 UTC (rev 201556)
+++ trunk/Source/WebCore/platform/network/BlobResourceHandle.cpp        2016-06-01 17:14:09 UTC (rev 201557)
</span><span class="lines">@@ -202,8 +202,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     if (!equalLettersIgnoringASCIICase(firstRequest().httpMethod(), &quot;get&quot;)) {
</span><del>-        m_errorCode = methodNotAllowed;
-        notifyResponse();
</del><ins>+        notifyFail(methodNotAllowed);
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorexmlXMLHttpRequestcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/xml/XMLHttpRequest.cpp (201556 => 201557)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/xml/XMLHttpRequest.cpp        2016-06-01 16:58:08 UTC (rev 201556)
+++ trunk/Source/WebCore/xml/XMLHttpRequest.cpp        2016-06-01 17:14:09 UTC (rev 201557)
</span><span class="lines">@@ -668,7 +668,7 @@
</span><span class="cx"> void XMLHttpRequest::createRequest(ExceptionCode&amp; ec)
</span><span class="cx"> {
</span><span class="cx">     // Only GET request is supported for blob URL.
</span><del>-    if (m_url.protocolIsBlob() &amp;&amp; m_method != &quot;GET&quot;) {
</del><ins>+    if (!m_async &amp;&amp; m_url.protocolIsBlob() &amp;&amp; m_method != &quot;GET&quot;) {
</ins><span class="cx">         ec = NETWORK_ERR;
</span><span class="cx">         return;
</span><span class="cx">     }
</span></span></pre>
</div>
</div>

</body>
</html>