Revert "Issue #2258 - Part 2: Move XCTO:nosniff check into sniffers."

This reverts commit 51e1650d42b2c033d5d55750b4ea497053524c93.
This commit is contained in:
Moonchild 2025-09-23 18:17:45 +02:00 committed by roytam1
commit 73c9c1dd73
5 changed files with 14 additions and 17 deletions

View file

@ -317,11 +317,9 @@ nsUnknownDecoder::GetMIMETypeFromContent(nsIRequest* aRequest,
{
// Note: This is only used by sniffer, therefore we do not need to lock anything here.
nsCOMPtr<nsIChannel> channel(do_QueryInterface(aRequest));
if (channel) {
nsCOMPtr<nsILoadInfo> loadInfo = channel->GetLoadInfo();
if (loadInfo->GetSkipContentSniffing()) {
return NS_ERROR_NOT_AVAILABLE;
}
nsCOMPtr<nsILoadInfo> loadInfo = channel->GetLoadInfo();
if (loadInfo->GetSkipContentSniffing()) {
return NS_OK;
}
mBuffer = const_cast<char*>(reinterpret_cast<const char*>(aData));
mBufferLen = aLength;