fixes bug 113959 "canceling a cached page load blows away the cache entry"

r=gagan, sr=mscott


git-svn-id: svn://10.0.0.236/trunk@113776 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
darin%netscape.com 2002-02-06 08:41:16 +00:00
parent 93152c8461
commit e1db58bee2

View File

@ -149,7 +149,7 @@ nsHttpChannel::Init(nsIURI *uri,
if (url)
url->SetHost(hostACE.get());
// overwrite |host|
host = hostACE;
host.Assign(hostACE);
}
rv = mURI->GetSpec(getter_Copies(mSpec));
if (NS_FAILED(rv)) return rv;
@ -1012,7 +1012,9 @@ nsHttpChannel::CloseCacheEntry(nsresult status)
if (mCacheEntry) {
LOG(("nsHttpChannel::CloseCacheEntry [this=%x status=%x]", this, status));
if (NS_FAILED(status) && (mCacheAccess & nsICache::ACCESS_WRITE)) {
// don't doom the cache entry if only reading from it...
if (NS_FAILED(status)
&& (mCacheAccess & nsICache::ACCESS_WRITE) && !mCacheReadRequest) {
LOG(("dooming cache entry!!"));
rv = mCacheEntry->Doom();
}