From 640315cbbae9e29565b96fd02f2aeded503141a3 Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Mon, 5 Jun 2017 09:20:37 +0100 Subject: [PATCH] Another attempt at fixing the 502 Gateway error. --- src/tawashi/cgi_env.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tawashi/cgi_env.cpp b/src/tawashi/cgi_env.cpp index cc88a32..1f08ae6 100644 --- a/src/tawashi/cgi_env.cpp +++ b/src/tawashi/cgi_env.cpp @@ -95,7 +95,7 @@ namespace cgi { if (boost::starts_with(parPath, base_path)) { //account for the trailing slash in either base path and path info - return std::min(parBasePath.size(), parPath.size()) + (1 - base_path_tr_slash); + return std::min(parBasePath.size() + (1 - base_path_tr_slash), parPath.size()); } else { std::string str_base_path(parBasePath.begin(), parBasePath.end());