Prefer regex to manual parsing in parseURL:

Although `parseURL` used a regex to pull the authority out of the URL
being parsed, it performed manual parsing of the hostname and port.

This commit rolls the parsing of the username and password, if any,
directly into the regex. The hostname can be a name, an IPv4 or an
IPv6 address.

Fixes #2751
This commit is contained in:
John Freeman
2018-11-07 11:26:48 -08:00
committed by Nik Bougalis
parent c1a02440dc
commit dc4d76f626
3 changed files with 224 additions and 44 deletions

View File

@@ -70,6 +70,8 @@ struct parsedURL
explicit parsedURL() = default;
std::string scheme;
std::string username;
std::string password;
std::string domain;
boost::optional<std::uint16_t> port;
std::string path;