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

Unified Diff: net/http/http_network_transaction.cc

Issue 2026863002: Disable AltSvc from insecure origin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
Index: net/http/http_network_transaction.cc
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index 6414180bfc3747ae240e275b5b500e36b61688aa..26bd1a6592584998f96e25639356633b8cb5a0de 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -1238,8 +1238,11 @@ int HttpNetworkTransaction::DoReadHeadersComplete(int result) {
return OK;
}
- session_->http_stream_factory()->ProcessAlternativeServices(
- session_, response_.headers.get(), url::SchemeHostPort(request_->url));
+ if (session_->params().enable_alternative_service_for_insecure_origins ||
+ IsSecureRequest()) {
+ session_->http_stream_factory()->ProcessAlternativeServices(
+ session_, response_.headers.get(), url::SchemeHostPort(request_->url));
+ }
if (IsSecureRequest())
stream_->GetSSLInfo(&response_.ssl_info);

Powered by Google App Engine
This is Rietveld 408576698