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

Unified Diff: net/http/http_util.cc

Issue 2101963002: Skip header lines with invalid header name (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | net/http/http_util_unittest.cc » ('j') | net/http/http_util_unittest.cc » ('J')
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 06fc15edd3668e367d0551cf4314de04beb73c65..06eb55e70bca89b20a019a75ee3ba0ff8823558d 100644
--- a/net/http/http_util.cc
+++ b/net/http/http_util.cc
@@ -910,7 +910,7 @@ bool HttpUtil::HeadersIterator::GetNext() {
continue;
TrimLWS(&name_begin_, &name_end_);
- if (name_begin_ == name_end_)
+ if (!IsToken(name_begin_, name_end_))
mmenke 2016/06/28 14:54:00 IsValidHeaderName seems clearer (It just calls IsT
robwu 2016/06/28 15:24:42 IsValidHeaderName takes a std::string, while we on
mmenke 2016/06/28 15:26:17 Oops, good point.
continue; // skip malformed header
values_begin_ = colon + 1;
« no previous file with comments | « no previous file | net/http/http_util_unittest.cc » ('j') | net/http/http_util_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698