You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Thomas Heigl (JIRA)" <ji...@apache.org> on 2019/04/08 10:54:00 UTC

[jira] [Comment Edited] (WICKET-6651) Redirecting with ResetResponseException does not work anymore

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

Thomas Heigl edited comment on WICKET-6651 at 4/8/19 10:53 AM:
---------------------------------------------------------------

Sorry for the very imprecise ticket description. I was in a hurry before.

Wicket now returns an {{Ajax-Location}} header but no client-side redirect happens.

8.3.0:
{code:java}
Redirect Response
301
Location: /verify-mail{code}
8.4.0:
{code:java}
Response 
301 
Ajax-Location: /verify-mail{code}
Looking at the code in {{RedirectRequestHandler}} this probably affects only the {{SC_MOVED_PERMANENTLY}} and {{SC_SEE_OTHER }} status codes. I can probably switch to {{SC_MOVED_TEMPORARILY}} to work around this issue for now.


was (Author: thomas.heigl):
Sorry for the very imprecise ticket description. I was in a hurry before.

Wicket now returns an {{Ajax-Location}} header but no client-side redirect happens.

8.3.0:
{code:java}
Redirect Response
301
Location: /verify-mail{code}
8.4.0:
{code:java}
Response 
301 
Ajax-Location: /verify-mail{code}
Looking at the code in {{RedirectRequestHandler}} this probably affects only the {{SC_MOVED_PERMANENTLY}} and {{SC_SEE_OTHER }}status codes. I can probably switch to {{SC_MOVED_TEMPORARILY}} to work around this issue for now.

> Redirecting with ResetResponseException does not work anymore
> -------------------------------------------------------------
>
>                 Key: WICKET-6651
>                 URL: https://issues.apache.org/jira/browse/WICKET-6651
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 8.4.0
>            Reporter: Thomas Heigl
>            Priority: Major
>
> After upgrading from 8.3.0 to 8.4.0 redirecting with {{ResetResponseException}} does not work anymore.
> I'm using the following exception to redirect on some of my pages:
> {code:java}
> public class RestartResponseWithStatusCodeException extends ResetResponseException {
>    
>    public RestartResponseWithStatusCodeException(final String url, final int statusCode) {
>       super(new RedirectRequestHandler(url, statusCode));
>    }
> }{code}
> This is most definitely caused by WICKET-6638.
> I don't have time to prepare a quickstart right now, but maybe someone knows what's going on? We discovered the issue on our stateless public pages, so it might also be related to statelessness.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)