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

Unified Diff: net/http/http_stream_factory_impl.cc

Issue 2030023005: Disable AltSvc from insecure origin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 6 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/http/http_network_transaction_unittest.cc ('k') | net/http/http_stream_factory_impl_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_factory_impl.cc
diff --git a/net/http/http_stream_factory_impl.cc b/net/http/http_stream_factory_impl.cc
index 228a622564978634c137188faacb496cb6f61c17..8b916580d9a267f97596319c7c577411536fe926 100644
--- a/net/http/http_stream_factory_impl.cc
+++ b/net/http/http_stream_factory_impl.cc
@@ -189,6 +189,10 @@ AlternativeService HttpStreamFactoryImpl::GetAlternativeServiceFor(
if (original_url.SchemeIs("ftp"))
return AlternativeService();
+ if (!session_->params().enable_alternative_service_for_insecure_origins &&
+ !original_url.SchemeIs("https"))
+ return AlternativeService();
+
url::SchemeHostPort origin(original_url);
HttpServerProperties& http_server_properties =
*session_->http_server_properties();
« no previous file with comments | « net/http/http_network_transaction_unittest.cc ('k') | net/http/http_stream_factory_impl_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698