[ https://issues.apache.org/jira/browse/WICKET-2061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12675120#action_12675120 ]
Matej Knopp commented on WICKET-2061: ------------------------------------- Juergen, the unit tests are broken on Mac. Obviously the default encoding of java file is not the same as you used (RequestEncodingTest). Can you escape the accented characters in strings? > interceptContinuationURL with umlauts not encoded > ------------------------------------------------- > > Key: WICKET-2061 > URL: https://issues.apache.org/jira/browse/WICKET-2061 > Project: Wicket > Issue Type: Bug > Components: wicket > Affects Versions: 1.3.5, 1.3.6, 1.4-RC1 > Reporter: Sven Meier > Assignee: Juergen Donnerstag > Fix For: 1.4-RC3 > > Attachments: encodingtest.zip > > > This is my second try to fix Wicket's encoding of redirects to intercepted > URLs. > Instead of reopening WICKET-2007, I decided to create this new issue and make > a clean start. > When Wicket redirects to an intercept page, it stores the original URL in > PageMap#interceptContinuationURL. > // The intercept continuation URL should be saved exactly as the > // original request specified. > ... > interceptContinuationURL = "/" + > cycle.getRequest().getURL(); > Note that comment and code are not in sync: > Instead of saving *exactly* the original request, a new URL is generated. > ServletWebRequest#getURL() includes special characters non-encoded. Thus on a > later continuation, the redirect to the original URL fails in case of special > characters (umlauts in our case). > We're now using a subclass of ServletWebRequest, which utilizes the > requestURI: > public String getURL() > { > // servletPath is de-encoded, so use requestURI minus > contextPath instead > // String url = getServletPath(); > String url = httpServletRequest.getRequestURI().substring( > httpServletRequest.getContextPath().length()); > final String pathInfo = getHttpServletRequest().getPathInfo(); > ... > } > I cannot say if this solution has unwanted side effects though. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.