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

Unified Diff: net/http/http_util.cc

Issue 2555813002: Don't consider '\0' as whitespace when parsing HTTP headers. (Closed)
Patch Set: EmbeddedNull --> Blah (and update comment) Created 4 years 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 | « no previous file | net/http/http_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_util.cc
diff --git a/net/http/http_util.cc b/net/http/http_util.cc
index 99b7192c838d500ce2bec2b783834f0bb94dfd22..b0043ab3bc6424f3920d4cb662ae55d233c1c5af 100644
--- a/net/http/http_util.cc
+++ b/net/http/http_util.cc
@@ -426,7 +426,8 @@ bool HttpUtil::IsNonCoalescingHeader(std::string::const_iterator name_begin,
}
bool HttpUtil::IsLWS(char c) {
- return strchr(HTTP_LWS, c) != NULL;
+ const base::StringPiece kWhiteSpaceCharacters(HTTP_LWS);
+ return kWhiteSpaceCharacters.find(c) != base::StringPiece::npos;
}
// static
« no previous file with comments | « no previous file | net/http/http_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698