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

Unified Diff: net/spdy/spdy_stream.cc

Issue 1357953002: Replace the existing SpdyHeaderBlock typedef with a class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add NET_EXPORT to fix compile error on win_chromium_compile_dbg_ng. Created 5 years, 3 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 | « net/spdy/spdy_session_unittest.cc ('k') | net/spdy/spdy_stream_test_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_stream.cc
diff --git a/net/spdy/spdy_stream.cc b/net/spdy/spdy_stream.cc
index e855b0b6f42752eed6b232596d455e7f996c9535..18f5fafcc00b1dfa48d6751854a554c0d4ecd5eb 100644
--- a/net/spdy/spdy_stream.cc
+++ b/net/spdy/spdy_stream.cc
@@ -882,21 +882,23 @@ int SpdyStream::MergeWithResponseHeaders(
for (SpdyHeaderBlock::const_iterator it = new_response_headers.begin();
it != new_response_headers.end(); ++it) {
// Disallow uppercase headers.
- if (ContainsUppercaseAscii(it->first)) {
- session_->ResetStream(stream_id_, RST_STREAM_PROTOCOL_ERROR,
- "Upper case characters in header: " + it->first);
+ if (ContainsUppercaseAscii(it->first.as_string())) {
+ session_->ResetStream(
+ stream_id_, RST_STREAM_PROTOCOL_ERROR,
+ "Upper case characters in header: " + it->first.as_string());
return ERR_SPDY_PROTOCOL_ERROR;
}
- SpdyHeaderBlock::iterator it2 = response_headers_.lower_bound(it->first);
+ SpdyHeaderBlock::iterator it2 =
+ response_headers_.find(it->first.as_string());
// Disallow duplicate headers. This is just to be conservative.
- if (it2 != response_headers_.end() && it2->first == it->first) {
+ if (it2 != response_headers_.end()) {
session_->ResetStream(stream_id_, RST_STREAM_PROTOCOL_ERROR,
- "Duplicate header: " + it->first);
+ "Duplicate header: " + it->first.as_string());
return ERR_SPDY_PROTOCOL_ERROR;
}
- response_headers_.insert(it2, *it);
+ response_headers_.insert(*it);
}
// If delegate_ is not yet attached, we'll call
« no previous file with comments | « net/spdy/spdy_session_unittest.cc ('k') | net/spdy/spdy_stream_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698