mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 00:08:39 +09:00
Issue #2258 - Part 1: Support XCTO:nosniff when navigating.
This commit is contained in:
parent
723180132d
commit
e56e5d6cb1
10 changed files with 103 additions and 5 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