diff options
author | caseq@google.com <caseq@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-21 13:38:45 +0000 |
---|---|---|
committer | caseq@google.com <caseq@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-21 13:38:45 +0000 |
commit | 50ba404bc0cbfc6de3b7490cac5e60035ca62479 (patch) | |
tree | ba9daa52bab3a66f821b46da98247863f722ad1f /webkit/glue/weburlloader_impl.cc | |
parent | fad4724ea22db25a776ddded782dbf0ee833f696 (diff) | |
download | chromium_src-50ba404bc0cbfc6de3b7490cac5e60035ca62479.zip chromium_src-50ba404bc0cbfc6de3b7490cac5e60035ca62479.tar.gz chromium_src-50ba404bc0cbfc6de3b7490cac5e60035ca62479.tar.bz2 |
Honor User-Agent header added by WebCore
- do not strip User-Agent while flattening headers in renderer
- do not override User-Agent header in the network stack if one is already supplied by higher level;
- added RequestHeaders::SetHeaderIfMissing
TEST=URLRequestTestHTTP.OverrideUserAgent
BUG=http://crbug.com/67063
Review URL=http://codereview.chromium.org/6065008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72131 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/weburlloader_impl.cc')
-rw-r--r-- | webkit/glue/weburlloader_impl.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/webkit/glue/weburlloader_impl.cc b/webkit/glue/weburlloader_impl.cc index 92d9713..d22b509 100644 --- a/webkit/glue/weburlloader_impl.cc +++ b/webkit/glue/weburlloader_impl.cc @@ -69,10 +69,8 @@ class HeaderFlattener : public WebHTTPHeaderVisitor { const std::string& value_utf8 = value.utf8(); // Skip over referrer headers found in the header map because we already - // pulled it out as a separate parameter. We likewise prune the UA since - // that will be added back by the network layer. - if (LowerCaseEqualsASCII(name_utf8, "referer") || - LowerCaseEqualsASCII(name_utf8, "user-agent")) + // pulled it out as a separate parameter. + if (LowerCaseEqualsASCII(name_utf8, "referer")) return; // Skip over "Cache-Control: max-age=0" header if the corresponding |