mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Bug 531801 Remove code that cached SSL content to disk when Cache-Control: public was sent
r=bz --HG-- extra : rebase_source : 8d02615ec3777cba578786b2d1aa60cce60b3c03
This commit is contained in:
parent
abb28de9dc
commit
99bea1dd7f
@ -2494,10 +2494,8 @@ nsHttpChannel::InitCacheEntry()
|
||||
if (mResponseHead->NoStore())
|
||||
mLoadFlags |= INHIBIT_PERSISTENT_CACHING;
|
||||
|
||||
// Only cache SSL content on disk if the server sent a
|
||||
// Cache-Control: public header, or if the user set the pref
|
||||
if (!gHttpHandler->CanCacheAllSSLContent() &&
|
||||
mConnectionInfo->UsingSSL() && !mResponseHead->CacheControlPublic())
|
||||
// Only cache SSL content on disk if the pref is set
|
||||
if (!gHttpHandler->IsPersistentHttpsCachingEnabled())
|
||||
mLoadFlags |= INHIBIT_PERSISTENT_CACHING;
|
||||
|
||||
if (mLoadFlags & INHIBIT_PERSISTENT_CACHING) {
|
||||
|
@ -105,7 +105,7 @@ public:
|
||||
nsIIDNService *IDNConverter() { return mIDNConverter; }
|
||||
PRUint32 PhishyUserPassLength() { return mPhishyUserPassLength; }
|
||||
|
||||
PRBool CanCacheAllSSLContent() { return mEnablePersistentHttpsCaching; }
|
||||
PRBool IsPersistentHttpsCachingEnabled() { return mEnablePersistentHttpsCaching; }
|
||||
|
||||
PRBool PromptTempRedirect() { return mPromptTempRedirect; }
|
||||
|
||||
|
@ -488,7 +488,6 @@ nsHttpResponseHead::Reset()
|
||||
mContentLength = LL_MAXUINT;
|
||||
mCacheControlNoStore = PR_FALSE;
|
||||
mCacheControlNoCache = PR_FALSE;
|
||||
mCacheControlPublic = PR_FALSE;
|
||||
mPragmaNoCache = PR_FALSE;
|
||||
mStatusText.Truncate();
|
||||
mContentType.Truncate();
|
||||
@ -638,7 +637,6 @@ nsHttpResponseHead::ParseCacheControl(const char *val)
|
||||
// clear flags
|
||||
mCacheControlNoCache = PR_FALSE;
|
||||
mCacheControlNoStore = PR_FALSE;
|
||||
mCacheControlPublic = PR_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -650,10 +648,6 @@ nsHttpResponseHead::ParseCacheControl(const char *val)
|
||||
// search header value for occurrence of "no-store"
|
||||
if (nsHttp::FindToken(val, "no-store", HTTP_HEADER_VALUE_SEPS))
|
||||
mCacheControlNoStore = PR_TRUE;
|
||||
|
||||
// search header value for occurrence of "public"
|
||||
if (nsHttp::FindToken(val, "public", HTTP_HEADER_VALUE_SEPS))
|
||||
mCacheControlPublic = PR_TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -56,7 +56,6 @@ public:
|
||||
, mContentLength(LL_MAXUINT)
|
||||
, mCacheControlNoStore(PR_FALSE)
|
||||
, mCacheControlNoCache(PR_FALSE)
|
||||
, mCacheControlPublic(PR_FALSE)
|
||||
, mPragmaNoCache(PR_FALSE) {}
|
||||
~nsHttpResponseHead()
|
||||
{
|
||||
@ -72,7 +71,6 @@ public:
|
||||
const nsAFlatCString &ContentCharset() { return mContentCharset; }
|
||||
PRBool NoStore() { return mCacheControlNoStore; }
|
||||
PRBool NoCache() { return (mCacheControlNoCache || mPragmaNoCache); }
|
||||
PRBool CacheControlPublic() { return mCacheControlPublic; }
|
||||
/**
|
||||
* Full length of the entity. For byte-range requests, this may be larger
|
||||
* than ContentLength(), which will only represent the requested part of the
|
||||
@ -150,7 +148,6 @@ private:
|
||||
nsCString mContentCharset;
|
||||
PRPackedBool mCacheControlNoStore;
|
||||
PRPackedBool mCacheControlNoCache;
|
||||
PRPackedBool mCacheControlPublic;
|
||||
PRPackedBool mPragmaNoCache;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user