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

Unified Diff: chrome/browser/extensions/api/web_request/web_request_api_helpers.cc

Issue 491123004: Make sure that HttpRequestHeaders contains valid key-value pairs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: edit comment Created 6 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
Index: chrome/browser/extensions/api/web_request/web_request_api_helpers.cc
diff --git a/chrome/browser/extensions/api/web_request/web_request_api_helpers.cc b/chrome/browser/extensions/api/web_request/web_request_api_helpers.cc
index df425e665e16675d72c2a7d8fa32da39240b83b4..80860db72d64f6045e3a2730bb80e106b5d123f7 100644
--- a/chrome/browser/extensions/api/web_request/web_request_api_helpers.cc
+++ b/chrome/browser/extensions/api/web_request/web_request_api_helpers.cc
@@ -1242,15 +1242,4 @@ void NotifyWebRequestAPIUsed(
}
}
-bool IsValidHeaderName(const std::string& name) {
- // Check whether the header name is RFC 2616-compliant.
- return net::HttpUtil::IsToken(name);
-}
-
-bool IsValidHeaderValue(const std::string& value) {
- // Just a sanity check: disallow NUL and CRLF.
- return value.find('\0') == std::string::npos &&
- value.find("\r\n") == std::string::npos;
-}
-
} // namespace extension_web_request_api_helpers
« no previous file with comments | « chrome/browser/extensions/api/web_request/web_request_api_helpers.h ('k') | chrome/common/chrome_content_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698