strip matrix parameter like ;jsessionid

This commit is contained in:
Sebastian Sdorra
2011-11-27 21:01:27 +01:00
parent 94d34470a1
commit 72bb3323dc

View File

@@ -247,11 +247,14 @@ public class DefaultCGIExecutor extends AbstractCGIExecutor
*/ */
private EnvList createEnvironment() private EnvList createEnvironment()
{ {
String pathInfo = request.getPathInfo();
String scriptName = request.getRequestURI().substring(0, // remove ;jsessionid
request.getRequestURI().length() - pathInfo.length()); String pathInfo = HttpUtil.removeMatrixParameter(request.getPathInfo());
String uri = HttpUtil.removeMatrixParameter(request.getRequestURI());
String scriptName = uri.substring(0, uri.length() - pathInfo.length());
String scriptPath = context.getRealPath(scriptName); String scriptPath = context.getRealPath(scriptName);
String pathTranslated = request.getPathTranslated(); String pathTranslated =
HttpUtil.removeMatrixParameter(request.getPathTranslated());
int len = request.getContentLength(); int len = request.getContentLength();
EnvList env = new EnvList(); EnvList env = new EnvList();