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

Unified Diff: net/http/http_network_transaction.cc

Issue 1720163002: When Alt-Svc header processing is enabled, do not process Alternate-Protocol (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_network_transaction.cc
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index cef8d7747b7165fe9029729ae342bc332a6303c8..ea36dca686701db6ebf87bbe7a6d8751bf823a7b 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -74,15 +74,16 @@ namespace {
void ProcessAlternativeServices(HttpNetworkSession* session,
const HttpResponseHeaders& headers,
const HostPortPair& http_host_port_pair) {
- if (session->params().parse_alternative_services &&
- headers.HasHeader(kAlternativeServiceHeader)) {
- std::string alternative_service_str;
- headers.GetNormalizedHeader(kAlternativeServiceHeader,
- &alternative_service_str);
- session->http_stream_factory()->ProcessAlternativeService(
- session->http_server_properties(), alternative_service_str,
- http_host_port_pair, *session);
- // If there is an "Alt-Svc" header, then ignore "Alternate-Protocol".
+ if (session->params().parse_alternative_services) {
+ if (headers.HasHeader(kAlternativeServiceHeader)) {
+ std::string alternative_service_str;
+ headers.GetNormalizedHeader(kAlternativeServiceHeader,
+ &alternative_service_str);
+ session->http_stream_factory()->ProcessAlternativeService(
+ session->http_server_properties(), alternative_service_str,
+ http_host_port_pair, *session);
+ }
+ // If "Alt-Svc" is enabled, then ignore "Alternate-Protocol".
return;
}
« no previous file with comments | « no previous file | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698