Bug #76558 --> clear the content type before reading from the cache channel.

sr=bienvenu
This commit is contained in:
mscott%netscape.com 2001-05-02 01:00:11 +00:00
parent 46ecdc9a26
commit 163a221150

View File

@ -742,6 +742,7 @@ nsresult nsNNTPProtocol::ReadFromMemCache(nsICacheEntryDescriptor *entry)
cacheListener->Init(m_channelListener, NS_STATIC_CAST(nsIChannel *, this), mailnewsUrl);
nsCOMPtr<nsIRequest> request;
m_ContentType = ""; // reset the content type for the upcoming read....
rv = cacheTransport->AsyncRead(cacheListener, m_channelContext, 0, PRUint32(-1), 0, getter_AddRefs(request));
NS_RELEASE(cacheListener);
@ -749,7 +750,6 @@ nsresult nsNNTPProtocol::ReadFromMemCache(nsICacheEntryDescriptor *entry)
if (NS_SUCCEEDED(rv)) // ONLY if we succeeded in actually starting the read should we return
{
// we're not calling nsMsgProtocol::AsyncRead(), which calls nsNNTPProtocol::LoadUrl, so we need to take care of some stuff it does.
m_ContentType = "";
m_channelListener = nsnull;
return rv;
}