You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2011/04/13 13:48:05 UTC
[jira] [Created] (WICKET-3611) Redirect to Buffer makes one
redirect too much
Redirect to Buffer makes one redirect too much
----------------------------------------------
Key: WICKET-3611
URL: https://issues.apache.org/jira/browse/WICKET-3611
Project: Wicket
Issue Type: Bug
Components: wicket-core
Affects Versions: 1.5-RC3
Reporter: Martin Grigorov
It seems the default redirect strategy makes one redirect more than needed.
Here is the scenario: there is a page A with a (non-ajax) link that sets page B as response page (setResponsePage(B.class).
In 1.4 this leads to two http requests:
- one to the A's link listener
- and another redirecting to page B
In 1.5 there are three:
- one to the A's link listener
- another redirecting to page B
- and yet another one again redirecting to B
With "redirect to render" strategy in both versions just two requests are issued.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (WICKET-3611) Redirect to Buffer makes one
redirect too much
Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3611?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Grigorov reassigned WICKET-3611:
---------------------------------------
Assignee: Martin Grigorov
> Redirect to Buffer makes one redirect too much
> ----------------------------------------------
>
> Key: WICKET-3611
> URL: https://issues.apache.org/jira/browse/WICKET-3611
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.5-RC3
> Reporter: Martin Grigorov
> Assignee: Martin Grigorov
> Attachments: wicket-3611.tgz
>
>
> It seems the default redirect strategy makes one redirect more than needed.
> Here is the scenario: there is a page A with a (non-ajax) link that sets page B as response page (setResponsePage(B.class).
> In 1.4 this leads to two http requests:
> - one to the A's link listener
> - and another redirecting to page B
> In 1.5 there are three:
> - one to the A's link listener
> - another redirecting to page B
> - and yet another one again redirecting to B
> With "redirect to render" strategy in both versions just two requests are issued.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-3611) Redirect to Buffer makes one
redirect too much
Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3611?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13019323#comment-13019323 ]
Martin Grigorov commented on WICKET-3611:
-----------------------------------------
I didn't check how 1.4 actually decides when to redirect but here is the behavior in 1.5 and I find it correct:
- clicking the link leads to link's listener interface (ILinkListener) where we set a new response page (B) - thus the first redirect (to B's mount point or /wicket/bookmarkable/...)
- the second request has currentUrl == "B's mount path" and targetUrl again B's mount path. Page B is stateless so there is no really need to redirect (for stateful pages a redirect to ?pageInfo is needed) but since this is Redirect_To_Buffer the page is not written in the response directly and thus the second redirect. The third request is handled by BufferedResponseMapper.
What bothers me is why the redirect strategies don't care about the request method - GET or POST ?
> Redirect to Buffer makes one redirect too much
> ----------------------------------------------
>
> Key: WICKET-3611
> URL: https://issues.apache.org/jira/browse/WICKET-3611
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.5-RC3
> Reporter: Martin Grigorov
> Assignee: Martin Grigorov
> Attachments: wicket-3611.tgz
>
>
> It seems the default redirect strategy makes one redirect more than needed.
> Here is the scenario: there is a page A with a (non-ajax) link that sets page B as response page (setResponsePage(B.class).
> In 1.4 this leads to two http requests:
> - one to the A's link listener
> - and another redirecting to page B
> In 1.5 there are three:
> - one to the A's link listener
> - another redirecting to page B
> - and yet another one again redirecting to B
> With "redirect to render" strategy in both versions just two requests are issued.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (WICKET-3611) Redirect to Buffer makes one
redirect too much
Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3611?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Grigorov resolved WICKET-3611.
-------------------------------------
Resolution: Invalid
> Redirect to Buffer makes one redirect too much
> ----------------------------------------------
>
> Key: WICKET-3611
> URL: https://issues.apache.org/jira/browse/WICKET-3611
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.5-RC3
> Reporter: Martin Grigorov
> Assignee: Martin Grigorov
> Attachments: wicket-3611.tgz
>
>
> It seems the default redirect strategy makes one redirect more than needed.
> Here is the scenario: there is a page A with a (non-ajax) link that sets page B as response page (setResponsePage(B.class).
> In 1.4 this leads to two http requests:
> - one to the A's link listener
> - and another redirecting to page B
> In 1.5 there are three:
> - one to the A's link listener
> - another redirecting to page B
> - and yet another one again redirecting to B
> With "redirect to render" strategy in both versions just two requests are issued.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (WICKET-3611) Redirect to Buffer makes one
redirect too much
Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3611?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Grigorov updated WICKET-3611:
------------------------------------
Attachment: wicket-3611.tgz
A quickstart that shows the behavior in 1.4.
> Redirect to Buffer makes one redirect too much
> ----------------------------------------------
>
> Key: WICKET-3611
> URL: https://issues.apache.org/jira/browse/WICKET-3611
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.5-RC3
> Reporter: Martin Grigorov
> Attachments: wicket-3611.tgz
>
>
> It seems the default redirect strategy makes one redirect more than needed.
> Here is the scenario: there is a page A with a (non-ajax) link that sets page B as response page (setResponsePage(B.class).
> In 1.4 this leads to two http requests:
> - one to the A's link listener
> - and another redirecting to page B
> In 1.5 there are three:
> - one to the A's link listener
> - another redirecting to page B
> - and yet another one again redirecting to B
> With "redirect to render" strategy in both versions just two requests are issued.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (WICKET-3611) Redirect to Buffer makes one
redirect too much
Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3611?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Grigorov resolved WICKET-3611.
-------------------------------------
Resolution: Fixed
Fix Version/s: 1.5-RC4
Fixed with r1091894.
> Redirect to Buffer makes one redirect too much
> ----------------------------------------------
>
> Key: WICKET-3611
> URL: https://issues.apache.org/jira/browse/WICKET-3611
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.5-RC3
> Reporter: Martin Grigorov
> Assignee: Martin Grigorov
> Fix For: 1.5-RC4
>
> Attachments: wicket-3611.tgz
>
>
> It seems the default redirect strategy makes one redirect more than needed.
> Here is the scenario: there is a page A with a (non-ajax) link that sets page B as response page (setResponsePage(B.class).
> In 1.4 this leads to two http requests:
> - one to the A's link listener
> - and another redirecting to page B
> In 1.5 there are three:
> - one to the A's link listener
> - another redirecting to page B
> - and yet another one again redirecting to B
> With "redirect to render" strategy in both versions just two requests are issued.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Reopened] (WICKET-3611) Redirect to Buffer makes one
redirect too much
Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3611?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Grigorov reopened WICKET-3611:
-------------------------------------
Re-open it after a talk with Igor in IRC.
There is no need to redirect to buffer if fromUrl and toUrl are the same.
> Redirect to Buffer makes one redirect too much
> ----------------------------------------------
>
> Key: WICKET-3611
> URL: https://issues.apache.org/jira/browse/WICKET-3611
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.5-RC3
> Reporter: Martin Grigorov
> Assignee: Martin Grigorov
> Fix For: 1.5-RC4
>
> Attachments: wicket-3611.tgz
>
>
> It seems the default redirect strategy makes one redirect more than needed.
> Here is the scenario: there is a page A with a (non-ajax) link that sets page B as response page (setResponsePage(B.class).
> In 1.4 this leads to two http requests:
> - one to the A's link listener
> - and another redirecting to page B
> In 1.5 there are three:
> - one to the A's link listener
> - another redirecting to page B
> - and yet another one again redirecting to B
> With "redirect to render" strategy in both versions just two requests are issued.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira