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

Unified Diff: net/spdy/spdy_proxy_client_socket_unittest.cc

Issue 1257623004: Send appropriate pseudo-headers in HTTP/2 CONNECT request. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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_http_utils_unittest.cc ('k') | net/spdy/spdy_test_util_common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_proxy_client_socket_unittest.cc
diff --git a/net/spdy/spdy_proxy_client_socket_unittest.cc b/net/spdy/spdy_proxy_client_socket_unittest.cc
index e3f370fbe843b66d94ce74797638527ac5ad2002..cec88be2ff776ae3a8b765c7ebc9af910f629526 100644
--- a/net/spdy/spdy_proxy_client_socket_unittest.cc
+++ b/net/spdy/spdy_proxy_client_socket_unittest.cc
@@ -312,8 +312,12 @@ void SpdyProxyClientSocketTest::AssertAsyncWriteWithReadsSucceeds(
void SpdyProxyClientSocketTest::PopulateConnectRequestIR(
SpdyHeaderBlock* block) {
(*block)[spdy_util_.GetMethodKey()] = "CONNECT";
- (*block)[spdy_util_.GetPathKey()] = kOriginHostPort;
- (*block)[spdy_util_.GetHostKey()] = kOriginHost;
+ if (spdy_util_.spdy_version() == HTTP2) {
+ (*block)[spdy_util_.GetHostKey()] = kOriginHostPort;
+ } else {
+ (*block)[spdy_util_.GetPathKey()] = kOriginHostPort;
+ (*block)[spdy_util_.GetHostKey()] = kOriginHost;
+ }
(*block)["user-agent"] = kUserAgent;
spdy_util_.MaybeAddVersionHeader(block);
}
« no previous file with comments | « net/spdy/spdy_http_utils_unittest.cc ('k') | net/spdy/spdy_test_util_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698