From 3f3fd585c166de4b1112706cb00dfbf9b78fdb7b Mon Sep 17 00:00:00 2001 From: Thulinma Date: Tue, 28 Nov 2017 14:47:14 +0100 Subject: [PATCH] Fixed protocol://:port notation for hostless ports over a protocol --- lib/http_parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/http_parser.cpp b/lib/http_parser.cpp index 41b69d5b..6f1caee9 100644 --- a/lib/http_parser.cpp +++ b/lib/http_parser.cpp @@ -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 = ""; }