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

Unified Diff: net/http/http_stream_factory_impl_job.cc

Issue 787803004: Update from https://crrev.com/307664 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase. Created 6 years 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/disk_cache/disk_cache_test_util.h ('k') | net/net.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5887d2a0516b014543eb9f2593cef41ed613ffed..83694437450b028590ae8617ad8ce1ec05071154 100644
--- a/net/http/http_stream_factory_impl_job.cc
+++ b/net/http/http_stream_factory_impl_job.cc
@@ -623,15 +623,15 @@ int HttpStreamFactoryImpl::Job::DoStart() {
&request_info_.url, &origin_url_,
priority_));
+ // Don't connect to restricted ports.
+ bool is_port_allowed = IsPortAllowedByDefault(origin_.port());
if (request_info_.url.SchemeIs("ftp")) {
// Never share connection with other jobs for FTP requests.
DCHECK(!waiting_job_);
- }
- // Don't connect to restricted ports.
- // Note: origin_.port() == request_info_.url.EffectiveIntPort()
- if (!IsEffectivePortAllowedByScheme(request_info_.url) &&
- !IsPortAllowedByOverride(origin_.port())) {
+ is_port_allowed = IsPortAllowedByFtp(origin_.port());
+ }
+ if (!is_port_allowed && !IsPortAllowedByOverride(origin_.port())) {
if (waiting_job_) {
waiting_job_->Resume(this);
waiting_job_ = NULL;
« no previous file with comments | « net/disk_cache/disk_cache_test_util.h ('k') | net/net.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698