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

Unified Diff: net/http/http_stream_factory_impl.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_stream_factory_impl.cc
diff --git a/net/http/http_stream_factory_impl.cc b/net/http/http_stream_factory_impl.cc
index fb9181cd316709acfbe3464775dce2fed8aaa92d..744b9807785c3bd325be7ae85c8e5a2a9c009ae6 100644
--- a/net/http/http_stream_factory_impl.cc
+++ b/net/http/http_stream_factory_impl.cc
@@ -217,6 +217,10 @@ AlternativeService HttpStreamFactoryImpl::GetAlternativeServiceForInternal(
if (original_url.SchemeIs("ftp"))
return AlternativeService();
+ if (!session_->params().enable_alternative_service_for_insecure_origins &&
+ !original_url.SchemeIs("https"))
Ryan Hamilton 2016/05/31 23:43:42 nit: I think this should probably have {}s since t
Bence 2016/06/01 10:54:38 Sorry, I missed this. Will do in a follow-up.
+ return AlternativeService();
+
url::SchemeHostPort origin(original_url);
HttpServerProperties& http_server_properties =
*session_->http_server_properties();

Powered by Google App Engine
This is Rietveld 408576698