mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-11 01:57:00 +00:00
Fixes bug 73016. Should not cache POST transactions. r=valeski, sr=dougt, a=loan
This commit is contained in:
parent
c7febdc5a2
commit
dfff8b71cd
@ -839,6 +839,11 @@ nsHTTPChannel::OpenCacheEntry()
|
||||
NS_ENSURE_TRUE(mHandler, NS_ERROR_NOT_INITIALIZED);
|
||||
NS_ENSURE_TRUE(!mCacheEntry, NS_ERROR_FAILURE);
|
||||
|
||||
// for now we only cache GET and HEAD transactions.
|
||||
if ((mRequest->Method() != nsHTTPAtoms::Get) &&
|
||||
(mRequest->Method() != nsHTTPAtoms::Head))
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
|
||||
nsCacheStoragePolicy storagePolicy;
|
||||
if (mLoadAttributes & INHIBIT_PERSISTENT_CACHING)
|
||||
storagePolicy = nsICache::STORE_IN_MEMORY;
|
||||
@ -2138,7 +2143,8 @@ nsHTTPChannel::Connect()
|
||||
}
|
||||
|
||||
#ifdef MOZ_NEW_CACHE
|
||||
SetRequestTime(NowInSeconds());
|
||||
if (mCacheEntry)
|
||||
SetRequestTime(NowInSeconds());
|
||||
#endif
|
||||
|
||||
mState = HS_WAITING_FOR_RESPONSE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user