mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-31 11:37:30 +09:00
Revert "Issue #2258 - Part 3: Allow sniffing with XCTO:nosniff + empty MIME type."
This reverts commit a56f978f70e2d96ba501d6a944be33460afc481a.
This commit is contained in:
parent
7b4bb08257
commit
2d4d48db72
5 changed files with 35 additions and 31 deletions
|
|
@ -2489,6 +2489,13 @@ imgLoader::GetMIMETypeFromContent(nsIRequest* aRequest,
|
|||
uint32_t aLength,
|
||||
nsACString& aContentType)
|
||||
{
|
||||
nsCOMPtr<nsIChannel> channel(do_QueryInterface(aRequest));
|
||||
if (channel) {
|
||||
nsCOMPtr<nsILoadInfo> loadInfo = channel->GetLoadInfo();
|
||||
if (loadInfo->GetSkipContentSniffing()) {
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
}
|
||||
return GetMimeTypeFromContent((const char*)aContents, aLength, aContentType);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue