File tree Expand file tree Collapse file tree 1 file changed +2
-14
lines changed
Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -668,23 +668,11 @@ AnyP::Uri::parseHost(Parser::Tokenizer &tok) const
668668
669669 // no brackets implies we are looking at IPv4address or reg-name
670670
671- static const CharacterSet IPv4chars = CharacterSet (" period" , " ." ) + CharacterSet::DIGIT;
672- SBuf ipv4ish; // IPv4address-ish
673- if (tok.prefix (ipv4ish, IPv4chars)) {
674- // This rejects non-IP addresses that our caller would have
675- // otherwise mistaken for a domain name (e.g., '127.0.0' or '1234.5').
676- Ip::Address ipCheck;
677- if (!ipCheck.fromHost (ipv4ish.c_str ()))
678- throw TextException (" malformed IP address in uri-host" , Here ());
679-
680- return ipv4ish;
681- }
682-
683- // XXX: This code does not detect/reject some bad host values (e.g. "!#$%&").
671+ // XXX: This code does not detect/reject some bad host values (e.g. `!#$%&`).
684672 // TODO: Add more checks here, after migrating the
685673 // non-CONNECT uri-host parsing code to use us.
686674
687- SBuf otherHost; // IPv4address-ish or reg-name-ish;
675+ SBuf otherHost; // IPv4address-ish or reg-name-ish
688676 // ":" is not in TCHAR so we will stop before any port specification
689677 if (tok.prefix (otherHost, CharacterSet::TCHAR))
690678 return otherHost;
You can’t perform that action at this time.
0 commit comments