Bug 1142124 - Never revalidate cache entries for synthesized responses. r=michal
authorJosh Matthews <josh@joshmatthews.net>
Wed, 11 Mar 2015 13:00:38 -0400
changeset 264456 4881139642104b65d7b1e71fa23d13c75af0c040
parent 264430 2fb7a59b725ef854befc3f3c9da1a3fa032d1b16
child 264457 ec2acf8601871f1ead377effe381257bcc1775bb
push id830
push userraliiev@mozilla.com
push dateFri, 19 Jun 2015 19:24:37 +0000
treeherdermozilla-release@932614382a68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmichal
bugs1142124
milestone39.0a1
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
Bug 1142124 - Never revalidate cache entries for synthesized responses. r=michal
netwerk/protocol/http/nsHttpChannel.cpp
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -3144,16 +3144,20 @@ nsHttpChannel::OnCacheEntryCheck(nsICach
         LOG(("Redirection-chain %s key %s\n",
              doValidation ? "contains" : "does not contain", cacheKey.get()));
 
         // Append cacheKey if not in the chain already
         if (!doValidation)
             mRedirectedCachekeys->AppendElement(cacheKey);
     }
 
+    if (doValidation && mInterceptCache == INTERCEPTED) {
+        doValidation = false;
+    }
+
     mCachedContentIsValid = !doValidation;
 
     if (doValidation) {
         //
         // now, we are definitely going to issue a HTTP request to the server.
         // make it conditional if possible.
         //
         // do not attempt to validate no-store content, since servers will not