summaryrefslogtreecommitdiffstats
path: root/netwerk/protocol/http/nsHttpChannel.cpp
diff options
context:
space:
mode:
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()
{
/**