diff --git a/netwerk/protocol/http/src/nsHttpChannel.cpp b/netwerk/protocol/http/src/nsHttpChannel.cpp index 30ef93fa8100..666265147b5f 100644 --- a/netwerk/protocol/http/src/nsHttpChannel.cpp +++ b/netwerk/protocol/http/src/nsHttpChannel.cpp @@ -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) { diff --git a/netwerk/protocol/http/src/nsHttpHandler.h b/netwerk/protocol/http/src/nsHttpHandler.h index 086be69c709c..026b40a727ab 100644 --- a/netwerk/protocol/http/src/nsHttpHandler.h +++ b/netwerk/protocol/http/src/nsHttpHandler.h @@ -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; } diff --git a/netwerk/protocol/http/src/nsHttpResponseHead.cpp b/netwerk/protocol/http/src/nsHttpResponseHead.cpp index 725d9d89c51e..451d90ec8072 100644 --- a/netwerk/protocol/http/src/nsHttpResponseHead.cpp +++ b/netwerk/protocol/http/src/nsHttpResponseHead.cpp @@ -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 diff --git a/netwerk/protocol/http/src/nsHttpResponseHead.h b/netwerk/protocol/http/src/nsHttpResponseHead.h index 890a79ddb9bf..03a2d3f61915 100644 --- a/netwerk/protocol/http/src/nsHttpResponseHead.h +++ b/netwerk/protocol/http/src/nsHttpResponseHead.h @@ -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; };