mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1098415 - Skip DNS prefetch requests that point to local resources. r=sworkman r=dragana
This commit is contained in:
parent
18a6151b7a
commit
6ce5d89ed6
@ -852,9 +852,15 @@ nsContentSink::PrefetchDNS(const nsAString &aHref)
|
||||
if (!uri) {
|
||||
return;
|
||||
}
|
||||
nsAutoCString host;
|
||||
uri->GetHost(host);
|
||||
CopyUTF8toUTF16(host, hostname);
|
||||
nsresult rv;
|
||||
bool isLocalResource = false;
|
||||
rv = NS_URIChainHasFlags(uri, nsIProtocolHandler::URI_IS_LOCAL_RESOURCE,
|
||||
&isLocalResource);
|
||||
if (NS_SUCCEEDED(rv) && !isLocalResource) {
|
||||
nsAutoCString host;
|
||||
uri->GetHost(host);
|
||||
CopyUTF8toUTF16(host, hostname);
|
||||
}
|
||||
}
|
||||
|
||||
if (!hostname.IsEmpty() && nsHTMLDNSPrefetch::IsAllowed(mDocument)) {
|
||||
|
Loading…
Reference in New Issue
Block a user