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

Unified Diff: net/spdy/spdy_test_util_common.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_proxy_client_socket_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_test_util_common.cc
diff --git a/net/spdy/spdy_test_util_common.cc b/net/spdy/spdy_test_util_common.cc
index e0437ff6564c35a5719cb09606b9482e1725a19f..935e4524fad5650448e9dd8cdcc05871ef88a2aa 100644
--- a/net/spdy/spdy_test_util_common.cc
+++ b/net/spdy/spdy_test_util_common.cc
@@ -976,10 +976,15 @@ SpdyFrame* SpdyTestUtil::ConstructSpdyConnect(
const HostPortPair& host_port_pair) const {
SpdyHeaderBlock block;
block[GetMethodKey()] = "CONNECT";
- block[GetPathKey()] = host_port_pair.ToString();
- block[GetHostKey()] = (host_port_pair.port() == 443)
- ? host_port_pair.host()
- : host_port_pair.ToString();
+ if (spdy_version() < HTTP2) {
+ block[GetPathKey()] = host_port_pair.ToString();
+ block[GetHostKey()] = (host_port_pair.port() == 443)
+ ? host_port_pair.host()
+ : host_port_pair.ToString();
+ } else {
+ block[GetHostKey()] = host_port_pair.ToString();
+ }
+
MaybeAddVersionHeader(&block);
AppendToHeaderBlock(extra_headers, extra_header_count, &block);
return ConstructSpdySyn(stream_id, block, priority, false, false);
« no previous file with comments | « net/spdy/spdy_proxy_client_socket_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698