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

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: Split test 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') | 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 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_))
continue; // skip malformed header
values_begin_ = colon + 1;
« 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