[
https://issues.apache.org/jira/browse/SLING-1846?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ian Boston resolved SLING-1846.
-------------------------------
Resolution: Not A Problem
Closing this since I am almost certain I have tested UTF-8 chars in paths many
times with no problems since this issue was created. Please create a new issue
if this problem persists. (last comment indicated it was a problem in the Felix
http service and not in the sling code.)
> URL decoding
> ------------
>
> Key: SLING-1846
> URL: https://issues.apache.org/jira/browse/SLING-1846
> Project: Sling
> Issue Type: Bug
> Reporter: Pierre-Luc Rigaux
>
> When we send an encoded url it is not decoded by Sling and it result by a 404
> answer.
> Exemple
> "/test/My%20story.doc" should be decoded to "/test/My%20story.doc"
>
> "%E9%9F%B3%E4%B9%90.mp3" should be decoded to "音乐.mp3"
> My workaround was to add this code to
> org.apache.sling.engine.impl.SlingHttpServletRequestImpl.SlingHttpServletRequestImpl(RequestData,
> HttpServletRequest) construtor
> // prepare the pathInfo property
> String pathInfo = servletRequest.getServletPath();
> if (servletRequest.getPathInfo() != null) {
> pathInfo = pathInfo.concat(servletRequest.getPathInfo());
> try {
> pathInfo = URLDecoder.decode(pathInfo, "UTF-8");
> } catch (UnsupportedEncodingException e) {
> // TODO Auto-generated catch block
> e.printStackTrace();
> }
> }
> this.pathInfo = pathInfo;
> By checking a bit the method
> javax.servlet.http.HttpServletRequest.getServletPath() should return a
> decoded url, witch it is not the case. I find out that implementation was the
> felix one, but I didn't go further.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira