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

Unified Diff: net/http/http_stream_factory_impl_job.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_job.cc
diff --git a/net/http/http_stream_factory_impl_job.cc b/net/http/http_stream_factory_impl_job.cc
index 5287924045f9e24e115318a98c3c3a7d2d790535..2f3c9b1d386c134c0701085c0b7776c3fda87871 100644
--- a/net/http/http_stream_factory_impl_job.cc
+++ b/net/http/http_stream_factory_impl_job.cc
@@ -217,6 +217,10 @@ HttpStreamFactoryImpl::Job::Job(HttpStreamFactoryImpl* stream_factory,
ptr_factory_(this) {
DCHECK(stream_factory);
DCHECK(session);
+ if (IsSpdyAlternative() &&
+ !session_->params().enable_alternative_service_for_insecure_origins) {
+ DCHECK(origin_url_.SchemeIs("https"));
+ }
if (IsQuicAlternative()) {
DCHECK(session_->params().enable_quic);
using_quic_ = true;

Powered by Google App Engine
This is Rietveld 408576698