Bug 1176988 - Patch 1 - Always hit cache irrespective of HTTP method if channel is being intercepted. r=jdm
authorNikhil Marathe <nsm.nikhil@gmail.com>
Tue, 18 Aug 2015 11:30:38 -0700
changeset 259684 728613ce6c705aac1aa66532b486ff04efca4db6
parent 259683 55bea2798c68e18837b1c3a6bf3503f721f00c08
child 259685 0af43571bfd874f79f5971aa6e3741b810f5fd36
push idunknown
push userunknown
push dateunknown
reviewersjdm
bugs1176988
milestone43.0a1
Bug 1176988 - Patch 1 - Always hit cache irrespective of HTTP method if channel is being intercepted. r=jdm
netwerk/protocol/http/nsHttpChannel.cpp
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -2851,17 +2851,17 @@ nsHttpChannel::OpenCacheEntry(bool isHtt
 
     if (mRequestHead.IsPost()) {
         // If the post id is already set then this is an attempt to replay
         // a post transaction via the cache.  Otherwise, we need a unique
         // post id for this transaction.
         if (mPostID == 0)
             mPostID = gHttpHandler->GenerateUniqueID();
     }
-    else if (!mRequestHead.IsGet() && !mRequestHead.IsHead()) {
+    else if (!PossiblyIntercepted() && !mRequestHead.IsGet() && !mRequestHead.IsHead()) {
         // don't use the cache for other types of requests
         return NS_OK;
     }
 
     if (mResuming) {
         // We don't support caching for requests initiated
         // via nsIResumableChannel.
         return NS_OK;