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

Unified Diff: net/http/http_util.cc

Issue 1215933004: New new versions of Starts/EndsWith and SplitString in net (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@starts_with
Patch Set: Created 5 years, 5 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: net/http/http_util.cc
diff --git a/net/http/http_util.cc b/net/http/http_util.cc
index b3819c21f5d5aa8d156b6de353ba8df65c5fc521..53693f4bae5b98b8ba2fcf1fd2c98832d462feb8 100644
--- a/net/http/http_util.cc
+++ b/net/http/http_util.cc
@@ -353,8 +353,8 @@ const char* const kForbiddenHeaderFields[] = {
// static
bool HttpUtil::IsSafeHeader(const std::string& name) {
std::string lower_name(base::StringToLowerASCII(name));
- if (base::StartsWithASCII(lower_name, "proxy-", true) ||
- base::StartsWithASCII(lower_name, "sec-", true))
+ if (base::StartsWith(lower_name, "proxy-", base::CompareCase::SENSITIVE) ||
+ base::StartsWith(lower_name, "sec-", base::CompareCase::SENSITIVE))
return false;
for (size_t i = 0; i < arraysize(kForbiddenHeaderFields); ++i) {
if (lower_name == kForbiddenHeaderFields[i])

Powered by Google App Engine
This is Rietveld 408576698