summaryrefslogtreecommitdiffstats
path: root/netwerk/protocol/http/nsHttpChannel.cpp
diff options
context:
space:
mode:
authorJustOff <Off.Just.Off@gmail.com>2018-05-15 00:32:07 +0300
committerJustOff <Off.Just.Off@gmail.com>2018-05-15 00:32:07 +0300
commit1c9d6206cb04027614d6857786d1d82767664b45 (patch)
treedd64ba865c10972e6e114783dfdfd3a988555e93 /netwerk/protocol/http/nsHttpChannel.cpp
parent1a0462b4587a127d90e36b1f50687a223be8ba0f (diff)
downloadUXP-1c9d6206cb04027614d6857786d1d82767664b45.tar
UXP-1c9d6206cb04027614d6857786d1d82767664b45.tar.gz
UXP-1c9d6206cb04027614d6857786d1d82767664b45.tar.lz
UXP-1c9d6206cb04027614d6857786d1d82767664b45.tar.xz
UXP-1c9d6206cb04027614d6857786d1d82767664b45.zip
Revert incorrect UAO optimization that broke SSUAO
Diffstat (limited to 'netwerk/protocol/http/nsHttpChannel.cpp')
-rw-r--r--netwerk/protocol/http/nsHttpChannel.cpp46
1 files changed, 0 insertions, 46 deletions
diff --git a/netwerk/protocol/http/nsHttpChannel.cpp b/netwerk/protocol/http/nsHttpChannel.cpp
index 05699df62..9107b16e8 100644
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -6031,8 +6031,6 @@ nsHttpChannel::BeginConnect()
// notify "http-on-modify-request" observers
CallOnModifyRequestObservers();
- SetLoadGroupUserAgentOverride();
-
// Check if request was cancelled during on-modify-request or on-useragent.
if (mCanceled) {
return mStatus;
@@ -8400,50 +8398,6 @@ nsHttpChannel::MaybeWarnAboutAppCache()
}
void
-nsHttpChannel::SetLoadGroupUserAgentOverride()
-{
- nsCOMPtr<nsIURI> uri;
- GetURI(getter_AddRefs(uri));
- nsAutoCString uriScheme;
- if (uri) {
- uri->GetScheme(uriScheme);
- }
-
- // We don't need a UA for file: protocols.
- if (uriScheme.EqualsLiteral("file")) {
- gHttpHandler->OnUserAgentRequest(this);
- return;
- }
-
- nsIRequestContextService* rcsvc = gHttpHandler->GetRequestContextService();
- nsCOMPtr<nsIRequestContext> rc;
- if (rcsvc) {
- rcsvc->GetRequestContext(mRequestContextID,
- getter_AddRefs(rc));
- }
-
- nsAutoCString ua;
- if (nsContentUtils::IsNonSubresourceRequest(this)) {
- gHttpHandler->OnUserAgentRequest(this);
- if (rc) {
- GetRequestHeader(NS_LITERAL_CSTRING("User-Agent"), ua);
- rc->SetUserAgentOverride(ua);
- }
- } else {
- GetRequestHeader(NS_LITERAL_CSTRING("User-Agent"), ua);
- // Don't overwrite the UA if it is already set (eg by an XHR with explicit UA).
- if (ua.IsEmpty()) {
- if (rc) {
- rc->GetUserAgentOverride(ua);
- SetRequestHeader(NS_LITERAL_CSTRING("User-Agent"), ua, false);
- } else {
- gHttpHandler->OnUserAgentRequest(this);
- }
- }
- }
-}
-
-void
nsHttpChannel::SetDoNotTrack()
{
/**