mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
1) Fix issue with servlet based Web Script url encoding - wasn't decoding URL after method used to retrieve url path info was changed.
2) Remove unused imports git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6213 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -24,6 +24,9 @@
|
||||
*/
|
||||
package org.alfresco.web.scripts;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@@ -102,7 +105,14 @@ public class WebScriptServletRuntime extends WebScriptRuntime
|
||||
// NOTE: Don't use req.getPathInfo() - it truncates the path at first semi-colon in Tomcat
|
||||
String requestURI = req.getRequestURI();
|
||||
String pathInfo = requestURI.substring((req.getContextPath() + req.getServletPath()).length());
|
||||
return pathInfo;
|
||||
try
|
||||
{
|
||||
return URLDecoder.decode(pathInfo, "UTF-8");
|
||||
}
|
||||
catch(UnsupportedEncodingException e)
|
||||
{
|
||||
throw new WebScriptException("Failed to retrieve path info", e);
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
Reference in New Issue
Block a user