Commits

Sebastian Sdorra  committed 193a254

decode cgi environment variable PATH_INFO

  • Participants
  • Parent commits aa8b8a4
  • Branches issue-79

Comments (0)

Files changed (1)

File scm-webapp/src/main/java/sonia/scm/web/cgi/DefaultCGIExecutor.java

       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);