Commit graph

10 commits

Author SHA1 Message Date
Moonchild
659a3c0fcc Issue #2258 - Make sure we favor sniffing when the content-type header is empty. 2025-09-26 23:15:48 +08:00
Moonchild
0d00c84033 Revert "Issue #2258 - Part 1: Support XCTO:nosniff when navigating."
This reverts commit f48c770701e62c382631620f4caa1fdc5ab1d7ae.
2025-09-26 23:15:31 +08:00
Moonchild
73c9c1dd73 Revert "Issue #2258 - Part 2: Move XCTO:nosniff check into sniffers."
This reverts commit 51e1650d42b2c033d5d55750b4ea497053524c93.
2025-09-26 23:15:12 +08:00
Moonchild
2d4d48db72 Revert "Issue #2258 - Part 3: Allow sniffing with XCTO:nosniff + empty MIME type."
This reverts commit a56f978f70e2d96ba501d6a944be33460afc481a.
2025-09-26 23:14:52 +08:00
Moonchild
7b4bb08257 Revert "Issue #2258 - Part 4: Clean up unused pointers."
This reverts commit 9e52953e5486412bcb5613b4cea5a4f54544db2e.
2025-09-26 23:14:28 +08:00
Moonchild
bd734f795c Issue #2258 - Part 4: Clean up unused pointers. 2025-08-18 09:47:53 +08:00
Moonchild
707c3e3fa8 Issue #2258 - Part 3: Allow sniffing with XCTO:nosniff + empty MIME type.
This moves the checking code back to NS_SniffContent and specifically
checks requests for either:
- Empty `Content-type` header, OR
- A known JSON MIME type

If present, sniffing is allowed despite `nosniff` because in the first
case this is webmaster error (conflicting `nosniff` without MIME type
would always fail, so sniff it), and in the second case we need this
carveout or our json viewer will break.
2025-08-18 09:47:36 +08:00
Moonchild
cca20ae131 Issue #2258 - Part 2: Move XCTO:nosniff check into sniffers.
This fixes a regression for the JSON viewer from part 1 as it relies on
sniffing to prettify (and should carve out the exception even if `nosniff`
headers are sent).
No real functional changes otherwise. Just catering to a corner case.
2025-08-18 09:47:21 +08:00
Moonchild
e56e5d6cb1 Issue #2258 - Part 1: Support XCTO:nosniff when navigating. 2025-08-18 09:46:58 +08:00
Roy Tam
dcd9973243 import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00