Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Unified Diff: net/http/http_request_headers.h

Issue 2225933004: Avoid adding invalid headers in AddHeaderFromString (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_content_disposition.cc ('k') | net/http/http_request_headers.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_request_headers.h
diff --git a/net/http/http_request_headers.h b/net/http/http_request_headers.h
index 62ec37cab9f4f759df67b7ebaf971f69abcb6555..5efa5b5b7f87f15efa490b2383db11426479e49b 100644
--- a/net/http/http_request_headers.h
+++ b/net/http/http_request_headers.h
@@ -100,6 +100,8 @@ class NET_EXPORT HttpRequestHeaders {
// Sets the header value pair for |key| and |value|. If |key| already exists,
// then the header value is modified, but the key is untouched, and the order
// in the vector remains the same. When comparing |key|, case is ignored.
+ // The caller must ensure that |key| passes HttpUtil::IsValidHeaderName() and
+ // |value| passes HttpUtil::IsValidHeaderValue().
void SetHeader(const base::StringPiece& key, const base::StringPiece& value);
// Sets the header value pair for |key| and |value|, if |key| does not exist.
« no previous file with comments | « net/http/http_content_disposition.cc ('k') | net/http/http_request_headers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698