You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Zbigniew Ruchała (JIRA)" <ji...@apache.org> on 2010/03/02 10:01:28 UTC

[jira] Commented: (WICKET-1825) url-escaping is not undone for requestcodingstrategy

    [ https://issues.apache.org/jira/browse/WICKET-1825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12840067#action_12840067 ] 

Zbigniew Ruchała commented on WICKET-1825:
------------------------------------------

The fix produces a lot of : "No current Application found - defaulting encoding to UTF-8" entries in my logs which are redundant (WARN level)
The trivial fix moves calling WicketURLDecoder.PATH_INSTANCE.decode(..) after thread-local is set.


> url-escaping is not undone for requestcodingstrategy
> ----------------------------------------------------
>
>                 Key: WICKET-1825
>                 URL: https://issues.apache.org/jira/browse/WICKET-1825
>             Project: Wicket
>          Issue Type: Bug
>            Reporter: Ann Baert
>            Assignee: Igor Vaynberg
>             Fix For: 1.4.6
>
>         Attachments: ResourceImgTest.html, ResourceImgTest.java, TestResourceReference.java
>
>
> When a resourceUrl with special characters is invoked by Wicket. Wicket does not read it correctly.
> In the test-application I add two images.
> The first one I call with a special character in the name of the resourceReference and it doesn't work (ERROR - shared resource org.apache.wicket.Application/withSpecialChar%DB%A9 not found).
> The second one is the same image but with no special character in the call and that works fine.
> Please also review WicketFilter, the method:getLastModified(final HttpServletRequest servletRequest). This need also be fixed.
> I resolved the problem by changing the resourceReferenceKey in WicketFilter, getLastModified to:
>  final  String resourceReferenceKey = WicketURLDecoder.PATH_INSTANCE.decode(pathInfo.substring(WebRequestCodingStrategy.RESOURCES_PATH_PREFIX.length()));
> and I changed addResourceParameters(Request request, RequestParameters parameters) in WebRequestCodingStrategy:
> StringBuffer path = new StringBuffer(WicketURLDecoder.PATH_INSTANCE.decode(pathInfo.substring(ix)));

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.