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; |
} |