29858. special case a */* content type returned from the server. we want to treat it as unknown and ask the user what to do.

This commit is contained in:
valeski%netscape.com 2000-03-30 22:24:07 +00:00
parent 70e003409f
commit 45a4daefea

View File

@ -341,11 +341,18 @@ nsresult nsDocumentOpenInfo::DispatchContent(nsIChannel * aChannel, nsISupports
// the underlying stream converter which we then set to be this channelListener's
// mNextListener. This effectively nestles the stream converter down right
// in between the raw stream and the final listener.
rv = RetargetOutput(aChannel, contentType, "*/*", nextLink);
NS_RELEASE(nextLink);
if (m_targetStreamListener) {
return NS_OK;
// catch the case when some joker server sends back a content type of "*/*"
// because we said we could handle "*/*" in our accept headers
if (nsCRT::strcmp(contentType, "*/*")) {
rv = RetargetOutput(aChannel, contentType, "*/*", nextLink);
NS_RELEASE(nextLink);
if (m_targetStreamListener) {
return NS_OK;
}
} else {
NS_RELEASE(nextLink);
}
}