trying to get submit form to work...

This commit is contained in:
Eric LAZO
2022-08-12 20:08:49 +02:00
parent c7bbf29a1b
commit 4d395088d0
5 changed files with 24 additions and 8 deletions

View File

@@ -199,17 +199,17 @@ If we get a url that ends in / ignore the last /
*/
std::string uri = path;
if (uri[uri.size() - 1] == '/')
if (uri[uri.size() - 1] == '/' && uri.size() != 1)
uri.erase(uri.size() - 1);
for (std::vector<LocationConfig>::const_iterator it = server.locations.begin(); it != server.locations.end(); it++)
{
std::cout << it->path << " -- ";
// std::cout << it->path << " -- ";
if (it->path.size() > uri.size())
{
std::cout << "skipping this one\n";
// std::cout << "skipping this one\n";
continue ;
}