mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1009531 - Failing to use preloaded cache for hosted applications over https, r=jduell
This commit is contained in:
parent
1f471feba2
commit
59d1573f6c
@ -2740,7 +2740,7 @@ nsHttpChannel::OnCacheEntryCheck(nsICacheEntry* entry, nsIApplicationCache* appC
|
||||
(appCache ||
|
||||
(mCacheEntryIsReadOnly && !(mLoadFlags & nsIRequest::INHIBIT_CACHING)) ||
|
||||
mFallbackChannel)) {
|
||||
rv = OpenCacheInputStream(entry, true);
|
||||
rv = OpenCacheInputStream(entry, true, !!appCache);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
mCachedContentIsValid = true;
|
||||
entry->MaybeMarkValid();
|
||||
@ -2791,7 +2791,7 @@ nsHttpChannel::OnCacheEntryCheck(nsICacheEntry* entry, nsIApplicationCache* appC
|
||||
rv = MaybeSetupByteRangeRequest(size, contentLength);
|
||||
mCachedContentIsPartial = NS_SUCCEEDED(rv) && mIsPartialRequest;
|
||||
if (mCachedContentIsPartial) {
|
||||
rv = OpenCacheInputStream(entry, false);
|
||||
rv = OpenCacheInputStream(entry, false, !!appCache);
|
||||
*aResult = ENTRY_NEEDS_REVALIDATION;
|
||||
}
|
||||
return rv;
|
||||
@ -2987,7 +2987,7 @@ nsHttpChannel::OnCacheEntryCheck(nsICacheEntry* entry, nsIApplicationCache* appC
|
||||
}
|
||||
|
||||
if (mCachedContentIsValid || mDidReval) {
|
||||
rv = OpenCacheInputStream(entry, mCachedContentIsValid);
|
||||
rv = OpenCacheInputStream(entry, mCachedContentIsValid, !!appCache);
|
||||
if (NS_FAILED(rv)) {
|
||||
// If we can't get the entity then we have to act as though we
|
||||
// don't have the cache entry.
|
||||
@ -3379,7 +3379,8 @@ nsHttpChannel::ShouldUpdateOfflineCacheEntry()
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsHttpChannel::OpenCacheInputStream(nsICacheEntry* cacheEntry, bool startBuffering)
|
||||
nsHttpChannel::OpenCacheInputStream(nsICacheEntry* cacheEntry, bool startBuffering,
|
||||
bool checkingAppCacheEntry)
|
||||
{
|
||||
nsresult rv;
|
||||
|
||||
@ -3399,8 +3400,9 @@ nsHttpChannel::OpenCacheInputStream(nsICacheEntry* cacheEntry, bool startBufferi
|
||||
|
||||
// XXX: We should not be skilling this check in the offline cache
|
||||
// case, but we have to do so now to work around bug 794507.
|
||||
MOZ_ASSERT(mCachedSecurityInfo || mLoadedFromApplicationCache);
|
||||
if (!mCachedSecurityInfo && !mLoadedFromApplicationCache) {
|
||||
bool mustHaveSecurityInfo = !mLoadedFromApplicationCache && !checkingAppCacheEntry;
|
||||
MOZ_ASSERT(mCachedSecurityInfo || !mustHaveSecurityInfo);
|
||||
if (!mCachedSecurityInfo && mustHaveSecurityInfo) {
|
||||
LOG(("mCacheEntry->GetSecurityInfo returned success but did not "
|
||||
"return the security info [channel=%p, entry=%p]",
|
||||
this, cacheEntry));
|
||||
|
@ -328,7 +328,8 @@ private:
|
||||
bool ignoreMissingPartialLen = false) const;
|
||||
nsresult MaybeSetupByteRangeRequest(int64_t partialLen, int64_t contentLength);
|
||||
nsresult SetupByteRangeRequest(int64_t partialLen);
|
||||
nsresult OpenCacheInputStream(nsICacheEntry* cacheEntry, bool startBuffering);
|
||||
nsresult OpenCacheInputStream(nsICacheEntry* cacheEntry, bool startBuffering,
|
||||
bool checkingAppCacheEntry);
|
||||
|
||||
private:
|
||||
nsCOMPtr<nsISupports> mSecurityInfo;
|
||||
|
Loading…
Reference in New Issue
Block a user