decode cgi environment variable PATH_INFO

This commit is contained in:
Sebastian Sdorra
2011-12-15 20:44:28 +01:00
parent f9995da04b
commit 643dd1bed7

View File

@@ -281,6 +281,15 @@ public class DefaultCGIExecutor extends AbstractCGIExecutor
env.set(ENV_CONTENT_LENGTH, Integer.toString(len));
}
/**
* Decode PATH_INFO
* https://bitbucket.org/sdorra/scm-manager/issue/79/hgweb-decoding-issue
*/
if (Util.isNotEmpty(pathInfo))
{
pathInfo = HttpUtil.decode(pathInfo);
}
env.set(ENV_CONTENT_TYPE, Util.nonNull(request.getContentType()));
env.set(ENV_GATEWAY_INTERFACE, CGI_VERSION);
env.set(ENV_PATH_INFO, pathInfo);