Bug 567365 - allow bfcache for no-cache/https r=jduell r=bz

This commit is contained in:
Patrick McManus 2016-01-25 16:10:06 -05:00
Родитель 59aa3d21db
Коммит 3a54e21101
2 изменённых файлов: 5 добавлений и 11 удалений

Просмотреть файл

@ -12541,13 +12541,9 @@ nsDocShell::ShouldDiscardLayoutState(nsIHttpChannel* aChannel)
}
// figure out if SH should be saving layout state
nsCOMPtr<nsISupports> securityInfo;
bool noStore = false, noCache = false;
aChannel->GetSecurityInfo(getter_AddRefs(securityInfo));
bool noStore = false;
aChannel->IsNoStoreResponse(&noStore);
aChannel->IsNoCacheResponse(&noCache);
return (noStore || (noCache && securityInfo));
return noStore;
}
NS_IMETHODIMP

Просмотреть файл

@ -3206,11 +3206,9 @@ nsHttpChannel::OnCacheEntryCheck(nsICacheEntry* entry, nsIApplicationCache* appC
// which we must validate the cached response with the server.
else if (mLoadFlags & nsIRequest::VALIDATE_NEVER) {
LOG(("VALIDATE_NEVER set\n"));
// if no-store or if no-cache and ssl, validate cached response (see
// bug 112564 for an explanation of this logic)
if (mCachedResponseHead->NoStore() ||
(mCachedResponseHead->NoCache() && isHttps)) {
LOG(("Validating based on (no-store || (no-cache && ssl)) logic\n"));
// if no-store validate cached response (see bug 112564)
if (mCachedResponseHead->NoStore()) {
LOG(("Validating based on no-store logic\n"));
doValidation = true;
}
else {