summaryrefslogtreecommitdiffstats
path: root/uriloader/base
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:50 +0000
commitdef92d1b8e9d373e2f6f27c366d578d97d8960c6 (patch)
tree2ef34b9ad8bb9a9220e05d60352558b15f513894 /uriloader/base
parentAdding debian version 125.0.3-1. (diff)
downloadfirefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.tar.xz
firefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.zip
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'uriloader/base')
-rw-r--r--uriloader/base/nsURILoader.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/uriloader/base/nsURILoader.cpp b/uriloader/base/nsURILoader.cpp
index 792f3ea893..ef138f05d2 100644
--- a/uriloader/base/nsURILoader.cpp
+++ b/uriloader/base/nsURILoader.cpp
@@ -435,28 +435,28 @@ nsresult nsDocumentOpenInfo::DispatchContent(nsIRequest* request) {
NS_ASSERTION(!m_targetStreamListener,
"If we found a listener, why are we not using it?");
- if (mFlags & nsIURILoader::DONT_RETARGET) {
- LOG(
- (" External handling forced or (listener not interested and no "
- "stream converter exists), and retargeting disallowed -> aborting"));
- return NS_ERROR_WONT_HANDLE_CONTENT;
- }
-
// Before dispatching to the external helper app service, check for an HTTP
// error page. If we got one, we don't want to handle it with a helper app,
// really.
- // The WPT a-download-click-404.html requires us to silently handle this
- // without displaying an error page, so we just return early here.
- // See bug 1604308 for discussion around what the ideal behaviour is.
nsCOMPtr<nsIHttpChannel> httpChannel(do_QueryInterface(request));
if (httpChannel) {
bool requestSucceeded;
rv = httpChannel->GetRequestSucceeded(&requestSucceeded);
if (NS_FAILED(rv) || !requestSucceeded) {
- return NS_OK;
+ LOG(
+ (" Returning NS_ERROR_FILE_NOT_FOUND from "
+ "nsDocumentOpenInfo::DispatchContent due to failed HTTP response"));
+ return NS_ERROR_FILE_NOT_FOUND;
}
}
+ if (mFlags & nsIURILoader::DONT_RETARGET) {
+ LOG(
+ (" External handling forced or (listener not interested and no "
+ "stream converter exists), and retargeting disallowed -> aborting"));
+ return NS_ERROR_WONT_HANDLE_CONTENT;
+ }
+
// Fifth step:
//
// All attempts to dispatch this content have failed. Just pass it off to