Fix multiple slashes

FossilOrigin-Name: b30d5f0a62a6fded32d2946b44e5be2340c56254964f5a69493397e145110de6
This commit is contained in:
nekobit 2022-10-04 15:11:52 +00:00
parent bbb40970ae
commit 15000d2f86

View file

@ -103,7 +103,7 @@ bool Request::try_strip_slash()
if (url.length() == 0 || url == "/") return false;
bool ret = false;
// While loop because the user can just pass /url///////////...
while (url.back() == '/')
while (url.back() == '/' && url.length() != 1)
{
url.pop_back();
ret = true;