mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
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:
parent
70e003409f
commit
45a4daefea
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user