Backed out changeset 3555d4b1ab1e (bug 815299) for M4 bustage.
authorNigel Babu <nigelbabu@gmail.com>
Wed, 09 Sep 2015 09:12:31 +0530
changeset 294074 73250801ff8ff64c1d82c4d469e2c2f37efc554a
parent 294073 0f5defda5bf27fee6344f2a7847a892df192038e
child 294075 e9cb31373ec2bc63e3e35700a7c229ff97fe8f45
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs815299
milestone43.0a1
backs out3555d4b1ab1ec066327e69e509b8800af4c8903a
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 3555d4b1ab1e (bug 815299) for M4 bustage.
dom/fetch/FetchDriver.cpp
dom/workers/test/serviceworkers/fetch/fetch_tests.js
dom/workers/test/serviceworkers/fetch_event_worker.js
--- a/dom/fetch/FetchDriver.cpp
+++ b/dom/fetch/FetchDriver.cpp
@@ -472,21 +472,17 @@ FetchDriver::HttpFetch(bool aCORSFlag, b
       FailWithNetworkError();
       return rv;
     }
 
     // Set the same headers.
     nsAutoTArray<InternalHeaders::Entry, 5> headers;
     mRequest->Headers()->GetEntries(headers);
     for (uint32_t i = 0; i < headers.Length(); ++i) {
-      if (headers[i].mValue.IsEmpty()) {
-        httpChan->SetEmptyRequestHeader(headers[i].mName);
-      } else {
-        httpChan->SetRequestHeader(headers[i].mName, headers[i].mValue, false /* merge */);
-      }
+      httpChan->SetRequestHeader(headers[i].mName, headers[i].mValue, false /* merge */);
     }
 
     // Step 2. Set the referrer.
     nsAutoString referrer;
     mRequest->GetReferrer(referrer);
     if (referrer.EqualsLiteral(kFETCH_CLIENT_REFERRER_STR)) {
       rv = nsContentUtils::SetFetchReferrerURIWithPolicy(mPrincipal,
                                                          mDocument,
--- a/dom/workers/test/serviceworkers/fetch/fetch_tests.js
+++ b/dom/workers/test/serviceworkers/fetch/fetch_tests.js
@@ -315,17 +315,8 @@ fetch(new Request('body-blob', {method: 
 
 ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'].forEach(function(method) {
   fetchXHRWithMethod('xhr-method-test.txt', method, function(xhr) {
     my_ok(xhr.status == 200, method + " load should be successful");
     my_ok(xhr.responseText == ("intercepted " + method), method + " load should have synthesized response");
     finish();
   });
 });
-
-expectAsyncResult();
-fetch(new Request('empty-header', {headers:{"emptyheader":""}}))
-.then(function(res) {
-  return res.text();
-}).then(function(body) {
-  my_ok(body == "emptyheader", "The empty header was observed in the fetch event");
-  finish();
-});
--- a/dom/workers/test/serviceworkers/fetch_event_worker.js
+++ b/dom/workers/test/serviceworkers/fetch_event_worker.js
@@ -269,18 +269,9 @@ onfetch = function(ev) {
 
     var url = 'http://example.com/tests/dom/security/test/cors/file_CrossSiteXHR_server.sjs?status=200';
     ev.respondWith(fetch(url, { mode: 'no-cors' }));
   }
 
   else if (ev.request.url.includes('xhr-method-test.txt')) {
     ev.respondWith(new Response('intercepted ' + ev.request.method));
   }
-
-  else if (ev.request.url.includes('empty-header')) {
-    if (!ev.request.headers.has("emptyheader") ||
-        ev.request.headers.get("emptyheader") !== "") {
-      ev.respondWith(Promise.reject());
-      return;
-    }
-    ev.respondWith(new Response("emptyheader"));
-  }
 };