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 e6f64fafb1
commit 3f3fd585c1

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 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; port = host;
host = ""; host = "";
} }