diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
commit | fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch) | |
tree | 4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /uriloader/base | |
parent | Releasing progress-linux version 124.0.1-1~progress7.99u1. (diff) | |
download | firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'uriloader/base')
-rw-r--r-- | uriloader/base/nsURILoader.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/uriloader/base/nsURILoader.cpp b/uriloader/base/nsURILoader.cpp index 0acd451c9d..792f3ea893 100644 --- a/uriloader/base/nsURILoader.cpp +++ b/uriloader/base/nsURILoader.cpp @@ -274,12 +274,19 @@ nsresult nsDocumentOpenInfo::DispatchContent(nsIRequest* request) { // could happen because the Content-Disposition header is set so, or, in the // future, because the user has specified external handling for the MIME // type. + // + // If we're not going to be able to retarget to an external handler, ignore + // content-disposition, and unconditionally try to display the content. + // This is used for object/embed tags, which expect to display subresources + // marked with an attachment disposition. bool forceExternalHandling = false; - uint32_t disposition; - rv = aChannel->GetContentDisposition(&disposition); + if (!(mFlags & nsIURILoader::DONT_RETARGET)) { + uint32_t disposition; + rv = aChannel->GetContentDisposition(&disposition); - if (NS_SUCCEEDED(rv) && disposition == nsIChannel::DISPOSITION_ATTACHMENT) { - forceExternalHandling = true; + if (NS_SUCCEEDED(rv) && disposition == nsIChannel::DISPOSITION_ATTACHMENT) { + forceExternalHandling = true; + } } LOG((" forceExternalHandling: %s", forceExternalHandling ? "yes" : "no")); |