зеркало из https://github.com/mozilla/gecko-dev.git
Bug 537120 part 2: be more conservative as far as application of converters goes. r=jst
This commit is contained in:
Родитель
cd5d74649f
Коммит
016d3b7b09
|
@ -437,7 +437,8 @@ nsresult nsDocumentOpenInfo::DispatchContent(nsIRequest *request, nsISupports *
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we aren't allowed to try other listeners, we're done here.
|
// If we aren't allowed to try other listeners, just skip through to
|
||||||
|
// trying to convert the data.
|
||||||
if (!(mFlags & nsIURILoader::DONT_RETARGET)) {
|
if (!(mFlags & nsIURILoader::DONT_RETARGET)) {
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -516,26 +517,16 @@ nsresult nsDocumentOpenInfo::DispatchContent(nsIRequest *request, nsISupports *
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
LOG((" DONT_RETARGET flag set, so skipped over random other content "
|
||||||
|
"listeners and content handlers"));
|
||||||
}
|
}
|
||||||
} else if (mFlags & nsIURILoader::DONT_RETARGET) {
|
|
||||||
// External handling was forced, but we must not retarget
|
|
||||||
// -> abort
|
|
||||||
LOG((" External handling forced, but not allowed to retarget -> aborting"));
|
|
||||||
return NS_ERROR_WONT_HANDLE_CONTENT;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_ASSERTION(!m_targetStreamListener,
|
|
||||||
"If we found a listener, why are we not using it?");
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Fifth step: If no listener prefers this type, see if any stream
|
// Fifth step: If no listener prefers this type, see if any stream
|
||||||
// converters exist to transform this content type into
|
// converters exist to transform this content type into
|
||||||
// some other.
|
// some other.
|
||||||
//
|
//
|
||||||
|
|
||||||
// We always want to do this, since even content being forced to
|
|
||||||
// be handled externally may need decoding (eg via the unknown
|
|
||||||
// content decoder).
|
|
||||||
// Don't do this if the server sent us a MIME type of "*/*" because they saw
|
// Don't do this if the server sent us a MIME type of "*/*" because they saw
|
||||||
// it in our Accept header and got confused.
|
// it in our Accept header and got confused.
|
||||||
// XXXbz have to be careful here; may end up in some sort of bizarre infinite
|
// XXXbz have to be careful here; may end up in some sort of bizarre infinite
|
||||||
|
@ -551,9 +542,14 @@ nsresult nsDocumentOpenInfo::DispatchContent(nsIRequest *request, nsISupports *
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
NS_ASSERTION(!m_targetStreamListener,
|
||||||
|
"If we found a listener, why are we not using it?");
|
||||||
|
|
||||||
if (mFlags & nsIURILoader::DONT_RETARGET) {
|
if (mFlags & nsIURILoader::DONT_RETARGET) {
|
||||||
LOG((" Listener not interested and no stream converter exists, and retargeting disallowed -> aborting"));
|
LOG((" External handling forced or (listener not interested and no "
|
||||||
|
"stream converter exists), and retargeting disallowed -> aborting"));
|
||||||
return NS_ERROR_WONT_HANDLE_CONTENT;
|
return NS_ERROR_WONT_HANDLE_CONTENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче