Index: net/spdy/header_coalescer.cc |
diff --git a/net/spdy/header_coalescer.cc b/net/spdy/header_coalescer.cc |
index c3af46f5cb92087ce5563a1a8c7d34f35fb7c8a2..d4faa4fc056b7052fbf9a35d340a87e2583d4c53 100644 |
--- a/net/spdy/header_coalescer.cc |
+++ b/net/spdy/header_coalescer.cc |
@@ -11,8 +11,9 @@ namespace net { |
const size_t kMaxHeaderListSize = 256 * 1024; |
void HeaderCoalescer::OnHeader(base::StringPiece key, base::StringPiece value) { |
- if (error_seen_) |
+ if (error_seen_) { |
return; |
+ } |
if (key.empty()) { |
DVLOG(1) << "Header name must not be empty."; |
@@ -27,6 +28,15 @@ void HeaderCoalescer::OnHeader(base::StringPiece key, base::StringPiece value) { |
return; |
} |
+ if (key[0] == ':') { |
+ if (protocol_version_ == HTTP2 && regular_header_seen_) { |
+ error_seen_ = true; |
+ return; |
+ } |
+ } else { |
+ regular_header_seen_ = true; |
+ } |
+ |
auto iter = headers_.find(key); |
if (iter == headers_.end()) { |
headers_[key] = value; |