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

Unified Diff: net/http/http_network_layer.cc

Issue 1575048: SPDY: Change Chrome code to support new NPN protocols. (Closed)
Patch Set: oops Created 10 years, 8 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 | « no previous file | net/http/http_network_transaction.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_network_layer.cc
diff --git a/net/http/http_network_layer.cc b/net/http/http_network_layer.cc
index 8a225142e2c89be9cd2bea0817f87d5c0231a75b..4915cd1f7c991aa11f0d9c244508028faa929413 100644
--- a/net/http/http_network_layer.cc
+++ b/net/http/http_network_layer.cc
@@ -136,7 +136,14 @@ void HttpNetworkLayer::EnableSpdy(const std::string& mode) {
} else if (option == kDisableCompression) {
spdy::SpdyFramer::set_enable_compression_default(false);
} else if (option == kEnableNPN) {
- HttpNetworkTransaction::SetNextProtos("\007http1.1\004spdy");
+ // Except for the first element, the order is irrelevant. First element
+ // specifies the fallback in case nothing matches
+ // (SSLClientSocket::kNextProtoNoOverlap). Otherwise, the SSL library
+ // will choose the first overlapping protocol in the server's list, since
+ // it presumedly has a better understanding of which protocol we should
+ // use, therefore the rest of the ordering here is not important.
+ HttpNetworkTransaction::SetNextProtos(
+ "\008http/1.1\007http1.1\006spdy/1\004spdy");
force_spdy_ = false;
} else if (option.empty() && it == spdy_options.begin()) {
continue;
« no previous file with comments | « no previous file | net/http/http_network_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698