Fix tail detection

This commit is contained in:
alesapin 2019-06-25 12:12:28 +03:00
parent fa88954e56
commit fff18f78db

View File

@ -39,7 +39,7 @@ inline StringRef getURLHost(const char * data, size_t size)
if (pos != data)
{
StringRef scheme = getURLScheme(data, end - pos);
StringRef scheme = getURLScheme(data, pos - data - 2);
Pos scheme_end = data + scheme.size;
if (scheme.size && (pos - scheme_end != 3 || *scheme_end != ':'))
return StringRef{};