author | Ryan VanderMeulen <ryanvm@gmail.com> |
Thu, 04 Jun 2015 11:09:07 -0400 | |
changeset 247158 | 809818706503e44eac73569f7466280cb667d4cb |
parent 247157 | 9185ec7daf038f86b5613c6ec1f1b044f8664255 |
child 247159 | 335614e5c3527d2055e670b6eb1be140d02178eb |
push id | 28855 |
push user | kwierso@gmail.com |
push date | Fri, 05 Jun 2015 01:19:30 +0000 |
treeherder | mozilla-central@227d356ac030 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
bugs | 1170795 |
milestone | 41.0a1 |
backs out | e95a9e8e76508c6fc43aa52171fd57805240a26b |
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
|
--- a/dom/workers/test/serviceworkers/fetch/fetch_tests.js +++ b/dom/workers/test/serviceworkers/fetch/fetch_tests.js @@ -34,22 +34,16 @@ fetchXHR('test-respondwith-response.txt' }); fetchXHR('synthesized-404.txt', function(xhr) { my_ok(xhr.status == 404, "load should 404"); my_ok(xhr.responseText == "synthesized response body", "404 load should have synthesized response"); finish(); }); -fetchXHR('synthesized-308.txt', function(xhr) { - my_ok(xhr.status == 308, "load should return 308"); - my_ok(xhr.responseText == "synthesized response body", "308 load should have synthesized response"); - finish(); -}); - fetchXHR('synthesized-headers.txt', function(xhr) { my_ok(xhr.status == 200, "load should be successful"); my_ok(xhr.getResponseHeader("X-Custom-Greeting") === "Hello", "custom header should be set"); my_ok(xhr.responseText == "synthesized response body", "custom header load should have synthesized response"); finish(); }); fetchXHR('synthesized-redirect-real-file.txt', function(xhr) {
--- a/dom/workers/test/serviceworkers/fetch_event_worker.js +++ b/dom/workers/test/serviceworkers/fetch_event_worker.js @@ -8,22 +8,16 @@ onfetch = function(ev) { } else if (ev.request.url.includes("synthesized-404.txt")) { ev.respondWith(Promise.resolve( new Response("synthesized response body", { status: 404 }) )); } - else if (ev.request.url.includes("synthesized-308.txt")) { - ev.respondWith(Promise.resolve( - new Response("synthesized response body", { status: 308 }) - )); - } - else if (ev.request.url.includes("synthesized-headers.txt")) { ev.respondWith(Promise.resolve( new Response("synthesized response body", { headers: { "X-Custom-Greeting": "Hello" } }) ));
--- a/netwerk/protocol/http/nsHttpChannel.cpp +++ b/netwerk/protocol/http/nsHttpChannel.cpp @@ -2946,21 +2946,18 @@ nsHttpChannel::OnCacheEntryCheck(nsICach rv = mCachedResponseHead->Parse((char *) buf.get()); NS_ENSURE_SUCCESS(rv, rv); buf.Adopt(0); bool isCachedRedirect = WillRedirect(mCachedResponseHead); // Do not return 304 responses from the cache, and also do not return // any other non-redirect 3xx responses from the cache (see bug 759043). - // However, if this is a synthesized cache entry we don't care what the - // content is and will return it regardless. NS_ENSURE_TRUE((mCachedResponseHead->Status() / 100 != 3) || - isCachedRedirect || - mInterceptCache == INTERCEPTED, NS_ERROR_ABORT); + isCachedRedirect, NS_ERROR_ABORT); // Don't bother to validate items that are read-only, // unless they are read-only because of INHIBIT_CACHING or because // we're updating the offline cache. // Don't bother to validate if this is a fallback entry. if (!mApplicationCacheForWrite && (appCache || (mCacheEntryIsReadOnly && !(mLoadFlags & nsIRequest::INHIBIT_CACHING)) ||