Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
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)));