Commit c893068d authored by Shimi Zhang's avatar Shimi Zhang Committed by Commit Bot

Removes an unnecessary check in FromUntrimmedRawString

We removed the usage of HostForURL() in this function,
IPAddress::AssignedFromIPLiteral() is tolerated to '\0', so there is no
need for this check anymore.

Bug: 1030092
Change-Id: I1f37ff138ad1f06eab2bf82223bf7d567dc73e6e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2057542Reviewed-by: default avatarMatt Menke <mmenke@chromium.org>
Commit-Queue: Shimi Zhang <ctzsm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#742262}
parent 41b642a2
......@@ -62,11 +62,6 @@ SchemeHostPortMatcherRule::FromUntrimmedRawString(
std::string host;
int port;
if (ParseHostAndPort(raw, &host, &port)) {
// TODO(eroman): HostForURL() below DCHECKs() when |host| contains an
// embedded '\0'.
if (host.find('\0') != std::string::npos)
return nullptr;
IPAddress ip_address;
if (ip_address.AssignFromIPLiteral(host)) {
// Instead of -1, 0 is invalid for IPEndPoint.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment