mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 07:18:39 +09:00
Revert "Issue #2258 - Part 2: Move XCTO:nosniff check into sniffers."
This reverts commit 51e1650d42b2c033d5d55750b4ea497053524c93.
This commit is contained in:
parent
2d4d48db72
commit
73c9c1dd73
5 changed files with 14 additions and 17 deletions
|
|
@ -2129,6 +2129,16 @@ NS_SniffContent(const char *aSnifferType, nsIRequest *aRequest,
|
|||
const uint8_t *aData, uint32_t aLength,
|
||||
nsACString &aSniffedType)
|
||||
{
|
||||
// In case XCTO nosniff was present, we could just skip sniffing here
|
||||
nsCOMPtr<nsIChannel> channel = do_QueryInterface(aRequest);
|
||||
if (channel) {
|
||||
nsCOMPtr<nsILoadInfo> loadInfo = channel->GetLoadInfo();
|
||||
if (loadInfo->GetSkipContentSniffing()) {
|
||||
aSniffedType.Truncate();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
typedef nsCategoryCache<nsIContentSniffer> ContentSnifferCache;
|
||||
extern ContentSnifferCache* gNetSniffers;
|
||||
extern ContentSnifferCache* gDataSniffers;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue