mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
fixes bug 289374 "Wrong behaviour when combining INHIBIT_CACHING with LOAD_BYPASS_CACHE" r=biesi sr=bzbarsky a=dbaron
This commit is contained in:
parent
f4dc897f49
commit
1270d4f310
@ -1205,8 +1205,13 @@ nsHttpChannel::OpenCacheEntry(PRBool offline, PRBool *delayed)
|
||||
|
||||
// Set the desired cache access mode accordingly...
|
||||
nsCacheAccessMode accessRequested;
|
||||
if (offline || (mLoadFlags & INHIBIT_CACHING))
|
||||
accessRequested = nsICache::ACCESS_READ; // have no way of writing to cache
|
||||
if (offline || (mLoadFlags & INHIBIT_CACHING)) {
|
||||
// If we have been asked to bypass the cache and not write to the
|
||||
// cache, then don't use the cache at all.
|
||||
if (mLoadFlags & LOAD_BYPASS_CACHE && !offline)
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
accessRequested = nsICache::ACCESS_READ;
|
||||
}
|
||||
else if (mLoadFlags & LOAD_BYPASS_CACHE)
|
||||
accessRequested = nsICache::ACCESS_WRITE; // replace cache entry
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user