implement GetContentLength for a memory cache entry. This helps us report

progress for items coming out of the cache
This commit is contained in:
mscott%netscape.com 2000-04-25 01:48:48 +00:00
Родитель aa4dffcef8
Коммит 78ba47064e
1 изменённых файлов: 7 добавлений и 5 удалений

12
netwerk/cache/memcache/nsMemCacheChannel.cpp поставляемый
Просмотреть файл

@ -562,8 +562,7 @@ nsMemCacheChannel::SetPipeliningAllowed(PRBool aPipeliningAllowed)
NS_IMETHODIMP
nsMemCacheChannel::SetContentLength(PRInt32 aContentLength)
{
NS_NOTREACHED("nsMemCacheChannel::SetContentLength");
return NS_ERROR_NOT_IMPLEMENTED;
return NS_OK;
}
NS_IMETHODIMP
@ -601,9 +600,12 @@ nsMemCacheChannel::SetContentType(const char *aContentType)
NS_IMETHODIMP
nsMemCacheChannel::GetContentLength(PRInt32 *aContentLength)
{
// Not required to be implemented, since it is implemented by cache manager
NS_NOTREACHED("nsMemCacheChannel::GetContentLength");
return NS_ERROR_NOT_IMPLEMENTED;
PRUint32 cl = 0;
mRecord->GetStoredContentLength(&cl);
*aContentLength = (PRInt32) cl;
return NS_OK;
}
NS_IMETHODIMP