Bug 1017636 - Remove all conditional request headers when cache entry's sec-info or input fails to open. r=mcmanus, a=sledru
authorHonza Bambas <honzab.moz@firemni.cz>
Thu, 29 May 2014 19:42:33 +0200
changeset 199397 e53f3ba82db80ff49770acd1abbc5bb639ce7402
parent 199396 9374e6fdae90b06465d8e15e96aaa10f7be3f8a9
child 199398 e54d37bf5c5f24eeaa203cca1e4e8b202f99eec9
push id3624
push userasasaki@mozilla.com
push dateMon, 09 Jun 2014 21:49:01 +0000
treeherdermozilla-beta@b1a5da15899a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcmanus, sledru
bugs1017636
milestone31.0a2
Bug 1017636 - Remove all conditional request headers when cache entry's sec-info or input fails to open. r=mcmanus, a=sledru
netwerk/protocol/http/nsHttpChannel.cpp
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -3005,16 +3005,17 @@ nsHttpChannel::OnCacheEntryCheck(nsICach
     if (mCachedContentIsValid || mDidReval) {
         rv = OpenCacheInputStream(entry, mCachedContentIsValid);
         if (NS_FAILED(rv)) {
             // If we can't get the entity then we have to act as though we
             // don't have the cache entry.
             if (mDidReval) {
                 // Make the request unconditional again.
                 mRequestHead.ClearHeader(nsHttp::If_Modified_Since);
+                mRequestHead.ClearHeader(nsHttp::If_None_Match);
                 mRequestHead.ClearHeader(nsHttp::ETag);
                 mDidReval = false;
             }
             mCachedContentIsValid = false;
         }
     }
 
     if (mDidReval)