check for empty URL string

This commit is contained in:
orignal 2024-10-29 13:59:21 -04:00
parent 3f10f6651d
commit 8a8277edda
2 changed files with 5 additions and 5 deletions

View file

@ -103,6 +103,7 @@ namespace http
bool URL::parse(std::string_view url)
{
if (url.empty ()) return false;
std::size_t pos_p = 0; /* < current parse position */
std::size_t pos_c = 0; /* < work position */
if(url.at(0) != '/' || pos_p > 0)