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

Unified Diff: net/http/http_stream_factory.cc

Issue 754433003: Update from https://crrev.com/305340 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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_server_properties_manager.cc ('k') | net/http/http_stream_factory_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_factory.cc
diff --git a/net/http/http_stream_factory.cc b/net/http/http_stream_factory.cc
index 29d9b2642cfcd956b97c5eb3d78afdb784bc549d..f84b80c925399398725e6baa1335f75c1080444e 100644
--- a/net/http/http_stream_factory.cc
+++ b/net/http/http_stream_factory.cc
@@ -60,7 +60,7 @@ void HttpStreamFactory::ProcessAlternateProtocol(
}
if (!base::StringToInt(port_protocol_vector[0], &port) ||
- port <= 0 || port >= 1 << 16) {
+ port == 0 || !IsPortValid(port)) {
DVLOG(1) << kAlternateProtocolHeader
<< " header has unrecognizable port: "
<< port_protocol_vector[0];
@@ -94,8 +94,8 @@ void HttpStreamFactory::ProcessAlternateProtocol(
return;
}
- http_server_properties->SetAlternateProtocol(host_port, port, protocol,
- probability);
+ http_server_properties->SetAlternateProtocol(
+ host_port, static_cast<uint16>(port), protocol, probability);
}
GURL HttpStreamFactory::ApplyHostMappingRules(const GURL& url,
« no previous file with comments | « net/http/http_server_properties_manager.cc ('k') | net/http/http_stream_factory_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698