summaryrefslogtreecommitdiffstats
path: root/net/http/http_request_headers.h
diff options
context:
space:
mode:
authorcaseq@google.com <caseq@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-21 13:38:45 +0000
committercaseq@google.com <caseq@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-21 13:38:45 +0000
commit50ba404bc0cbfc6de3b7490cac5e60035ca62479 (patch)
treeba9daa52bab3a66f821b46da98247863f722ad1f /net/http/http_request_headers.h
parentfad4724ea22db25a776ddded782dbf0ee833f696 (diff)
downloadchromium_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 'net/http/http_request_headers.h')
-rw-r--r--net/http/http_request_headers.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/http/http_request_headers.h b/net/http/http_request_headers.h
index 734194a..2962ae2 100644
--- a/net/http/http_request_headers.h
+++ b/net/http/http_request_headers.h
@@ -95,6 +95,12 @@ class HttpRequestHeaders {
// in the vector remains the same. When comparing |key|, case is ignored.
void SetHeader(const base::StringPiece& key, const base::StringPiece& value);
+ // Sets the header value pair for |key| and |value|, if |key| does not exist.
+ // If |key| already exists, the call is a no-op.
+ // When comparing |key|, case is ignored.
+ void SetHeaderIfMissing(const base::StringPiece& key,
+ const base::StringPiece& value);
+
// Removes the first header that matches (case insensitive) |key|.
void RemoveHeader(const base::StringPiece& key);