mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-14 16:58:30 +00:00
* Allow hex for ip6 literal addr, fix #1800 * Add UT for ipv6 + Universal client implementation * add /n at EOF
This commit is contained in:
parent
25b1e0d906
commit
98cc1ec344
2 changed files with 18 additions and 1 deletions
|
@ -9213,7 +9213,7 @@ inline Client::Client(const std::string &scheme_host_port,
|
|||
const std::string &client_cert_path,
|
||||
const std::string &client_key_path) {
|
||||
const static std::regex re(
|
||||
R"((?:([a-z]+):\/\/)?(?:\[([\d:]+)\]|([^:/?#]+))(?::(\d+))?)");
|
||||
R"((?:([a-z]+):\/\/)?(?:\[([a-fA-F\d:]+)\]|([^:/?#]+))(?::(\d+))?)");
|
||||
|
||||
std::smatch m;
|
||||
if (std::regex_match(scheme_host_port, m, re)) {
|
||||
|
@ -9250,6 +9250,8 @@ inline Client::Client(const std::string &scheme_host_port,
|
|||
client_key_path);
|
||||
}
|
||||
} else {
|
||||
// NOTE: Update TEST(UniversalClientImplTest, Ipv6LiteralAddress)
|
||||
// if port param below changes.
|
||||
cli_ = detail::make_unique<ClientImpl>(scheme_host_port, 80,
|
||||
client_cert_path, client_key_path);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue