redirect with umlauts fails
---------------------------

                 Key: WICKET-2007
                 URL: https://issues.apache.org/jira/browse/WICKET-2007
             Project: Wicket
          Issue Type: Improvement
          Components: wicket
    Affects Versions: 1.4-RC1, 1.3.5
            Reporter: Sven Meier


A redirect does not contain encoding information - contentType seems to be 
ignored by IE and Firefox.
Neither does Wicket encode the URL of a redirect according to 
IRequestCycle#responseRequestEncoding.
Thus the browser cannot correctly decode umlauts in a redirect's target.

Thus I propose, that WebResponse#redirect(String) should always encode the 
given URL.

I'm currently using a subclass of WebResponse which utiilizes a tweaked 
WicketURLEncoder to encode all umlauts:

        public void redirect(String url) {
                url = redirectEncoder.encode(url);

                super.redirect(url);
        }

        // don't encode any delimiter
        private static final WicketURLEncoder redirectEncoder = new 
WicketURLEncoder(-1) {
                {
                        dontNeedEncoding.set(' ');
                        dontNeedEncoding.set('/');
                        dontNeedEncoding.set('?');
                        dontNeedEncoding.set('&');
                        dontNeedEncoding.set('=');
                        dontNeedEncoding.set('+');
                }
        };


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

Reply via email to