Fixed protocol://:port notation for hostless ports over a protocol

This commit is contained in:
Thulinma 2017-11-28 14:47:14 +01:00
parent e0af7a759e
commit 3a8698048b

View file

@ -131,7 +131,7 @@ HTTP::URL::URL(const std::string &url){
}
}
// if the host is numeric, assume it is a port, instead
if (is_numeric(host.c_str())){
if (host.size() && is_numeric(host.c_str())){
port = host;
host = "";
}