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

Unified Diff: net/tools/quic/test_tools/quic_test_client.cc

Issue 1544563002: Adds a DCHECK that the host argument to QuicInMemoryCache::AddResponse is not empty. An empty host … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@110267778
Patch Set: Created 5 years 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/tools/quic/quic_simple_server_stream_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/test_tools/quic_test_client.cc
diff --git a/net/tools/quic/test_tools/quic_test_client.cc b/net/tools/quic/test_tools/quic_test_client.cc
index b16714ab287101c4ef3d8c0bea5ad4eb06e9ccf6..52d91f0adc44b03cdd05e7a59b0280eb94597b8a 100644
--- a/net/tools/quic/test_tools/quic_test_client.cc
+++ b/net/tools/quic/test_tools/quic_test_client.cc
@@ -254,6 +254,10 @@ ssize_t QuicTestClient::GetOrCreateStreamAndSendRequest(
headers->GetAllOfHeaderAsString("transfer-encoding", &encoding);
spdy_headers.insert(std::make_pair("transfer-encoding", encoding));
}
+ if (static_cast<StringPiece>(spdy_headers[":authority"]).empty()) {
+ // HTTP/2 requests should include the :authority pseudo hader.
+ spdy_headers[":authority"] = client_->server_id().host();
+ }
ret = stream->SendRequest(spdy_headers, body, fin);
} else {
stream->SendBody(body.as_string(), fin, delegate);
« no previous file with comments | « net/tools/quic/quic_simple_server_stream_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698