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

Unified Diff: net/tools/quic/quic_simple_server_stream.cc

Issue 2431413004: Removes SpdyHeaderBlock::GetHeader(). No functional change. Not protected. (Closed)
Patch Set: Created 4 years, 2 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_header_block_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_simple_server_stream.cc
diff --git a/net/tools/quic/quic_simple_server_stream.cc b/net/tools/quic/quic_simple_server_stream.cc
index 992b87a3245c6cc1ac09ae7f5e6764000e58499f..15016d9931e3793cc37af13b2c28b5d96b570a34 100644
--- a/net/tools/quic/quic_simple_server_stream.cc
+++ b/net/tools/quic/quic_simple_server_stream.cc
@@ -175,9 +175,14 @@ void QuicSimpleServerStream::SendResponse() {
int response_code;
const SpdyHeaderBlock& response_headers = response->headers();
if (!ParseHeaderStatusCode(response_headers, &response_code)) {
- LOG(WARNING) << "Illegal (non-integer) response :status from cache: "
- << response_headers.GetHeader(":status") << " for request "
- << request_url;
+ auto status = response_headers.find(":status");
+ if (status == response_headers.end()) {
+ LOG(WARNING) << ":status not present in response from cache for request "
+ << request_url;
+ } else {
+ LOG(WARNING) << "Illegal (non-integer) response :status from cache: "
+ << status->second << " for request " << request_url;
+ }
SendErrorResponse();
return;
}
« no previous file with comments | « net/spdy/spdy_header_block_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698