cpp-netlib/uri

uri::has_host() returns true for "http://"

creste opened this issue · 3 comments

If the URI is "http://" then uri::has_host() returns true even though there is no host. I expected it to return false.

"http://" is not a valid URI. You are correct that this is an error, but the parser should fail.

"http://user@" will also return true for uri::has_host()

Both "http://" and "http://user@" are invalid URIs, and a syntax error is thrown for each.