You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Peter Ertl (JIRA)" <ji...@apache.org> on 2010/08/19 15:33:28 UTC

[jira] Created: (WICKET-3004) Using RedirectPolicy.NEVER_REDIRECT when redirecting to a page will break URLs

Using RedirectPolicy.NEVER_REDIRECT when redirecting to a page will break URLs
------------------------------------------------------------------------------

                 Key: WICKET-3004
                 URL: https://issues.apache.org/jira/browse/WICKET-3004
             Project: Wicket
          Issue Type: Bug
          Components: wicket
            Reporter: Peter Ertl
            Priority: Critical
         Attachments: broken-url-when-never-redirecting.patch

When using RedirectPolicy.NEVER_REDIRECT the WebPageRenderer uses the URL of the __target__ page instead of the current URL. This is wrong as the target page URL will never be visible in the address bar of the browser as no redirect will happen.

In consequence all references to the page (scripts, images, etc) are potentially broken, at least when the source and target url have different segment sizes. In this case the number of '../' for creating relative URL's will be wrong and the links are broken.

patch is attached.


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


[jira] Commented: (WICKET-3004) Using RedirectPolicy.NEVER_REDIRECT when redirecting to a page will break URLs

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3004?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12900878#action_12900878 ] 

Igor Vaynberg commented on WICKET-3004:
---------------------------------------

is this a cleaner patch?


Index: src/main/java/org/apache/wicket/request/handler/render/WebPageRenderer.java
===================================================================
--- src/main/java/org/apache/wicket/request/handler/render/WebPageRenderer.java	(revision 987645)
+++ src/main/java/org/apache/wicket/request/handler/render/WebPageRenderer.java	(working copy)
@@ -197,7 +197,7 @@
 			// or the targetUrl matches current url and the page is not stateless
 			// or the targetUrl matches current url, page is stateless but it's redirect-to-render
 			// just render the page
-			BufferedWebResponse response = renderPage(targetUrl, requestCycle);
+			BufferedWebResponse response = renderPage(currentUrl, requestCycle);
 			if (response != null)
 			{
 				response.writeTo((WebResponse)requestCycle.getResponse());


> Using RedirectPolicy.NEVER_REDIRECT when redirecting to a page will break URLs
> ------------------------------------------------------------------------------
>
>                 Key: WICKET-3004
>                 URL: https://issues.apache.org/jira/browse/WICKET-3004
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>            Reporter: Peter Ertl
>            Priority: Critical
>         Attachments: broken-url-when-never-redirecting.patch
>
>
> When using RedirectPolicy.NEVER_REDIRECT the WebPageRenderer uses the URL of the __target__ page instead of the current URL. This is wrong as the target page URL will never be visible in the address bar of the browser as no redirect will happen.
> In consequence all references to the page (scripts, images, etc) are potentially broken, at least when the source and target url have different segment sizes. In this case the number of '../' for creating relative URL's will be wrong and the links are broken.
> patch is attached.

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


[jira] Commented: (WICKET-3004) Using RedirectPolicy.NEVER_REDIRECT when redirecting to a page will break URLs

Posted by "Peter Ertl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3004?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12900978#action_12900978 ] 

Peter Ertl commented on WICKET-3004:
------------------------------------

Indeed, your patch is a lot cleaner. Sometimes you can't see the forest for the trees :-)

> Using RedirectPolicy.NEVER_REDIRECT when redirecting to a page will break URLs
> ------------------------------------------------------------------------------
>
>                 Key: WICKET-3004
>                 URL: https://issues.apache.org/jira/browse/WICKET-3004
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>            Reporter: Peter Ertl
>            Assignee: Igor Vaynberg
>            Priority: Critical
>             Fix For: 1.5-M2
>
>         Attachments: broken-url-when-never-redirecting.patch
>
>
> When using RedirectPolicy.NEVER_REDIRECT the WebPageRenderer uses the URL of the __target__ page instead of the current URL. This is wrong as the target page URL will never be visible in the address bar of the browser as no redirect will happen.
> In consequence all references to the page (scripts, images, etc) are potentially broken, at least when the source and target url have different segment sizes. In this case the number of '../' for creating relative URL's will be wrong and the links are broken.
> patch is attached.

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


[jira] Commented: (WICKET-3004) Using RedirectPolicy.NEVER_REDIRECT when redirecting to a page will break URLs

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3004?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12900887#action_12900887 ] 

Hudson commented on WICKET-3004:
--------------------------------

Integrated in Apache Wicket 1.5.x #250 (See [https://hudson.apache.org/hudson/job/Apache%20Wicket%201.5.x/250/])
    fixed handling of RedirectPolicy.NEVER_REDIRECT
Issue: WICKET-3004


> Using RedirectPolicy.NEVER_REDIRECT when redirecting to a page will break URLs
> ------------------------------------------------------------------------------
>
>                 Key: WICKET-3004
>                 URL: https://issues.apache.org/jira/browse/WICKET-3004
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>            Reporter: Peter Ertl
>            Priority: Critical
>         Attachments: broken-url-when-never-redirecting.patch
>
>
> When using RedirectPolicy.NEVER_REDIRECT the WebPageRenderer uses the URL of the __target__ page instead of the current URL. This is wrong as the target page URL will never be visible in the address bar of the browser as no redirect will happen.
> In consequence all references to the page (scripts, images, etc) are potentially broken, at least when the source and target url have different segment sizes. In this case the number of '../' for creating relative URL's will be wrong and the links are broken.
> patch is attached.

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


[jira] Resolved: (WICKET-3004) Using RedirectPolicy.NEVER_REDIRECT when redirecting to a page will break URLs

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-3004.
-----------------------------------

         Assignee: Igor Vaynberg
    Fix Version/s: 1.5-M2
       Resolution: Fixed

> Using RedirectPolicy.NEVER_REDIRECT when redirecting to a page will break URLs
> ------------------------------------------------------------------------------
>
>                 Key: WICKET-3004
>                 URL: https://issues.apache.org/jira/browse/WICKET-3004
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>            Reporter: Peter Ertl
>            Assignee: Igor Vaynberg
>            Priority: Critical
>             Fix For: 1.5-M2
>
>         Attachments: broken-url-when-never-redirecting.patch
>
>
> When using RedirectPolicy.NEVER_REDIRECT the WebPageRenderer uses the URL of the __target__ page instead of the current URL. This is wrong as the target page URL will never be visible in the address bar of the browser as no redirect will happen.
> In consequence all references to the page (scripts, images, etc) are potentially broken, at least when the source and target url have different segment sizes. In this case the number of '../' for creating relative URL's will be wrong and the links are broken.
> patch is attached.

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


[jira] Updated: (WICKET-3004) Using RedirectPolicy.NEVER_REDIRECT when redirecting to a page will break URLs

Posted by "Peter Ertl (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Ertl updated WICKET-3004:
-------------------------------

    Attachment: broken-url-when-never-redirecting.patch

> Using RedirectPolicy.NEVER_REDIRECT when redirecting to a page will break URLs
> ------------------------------------------------------------------------------
>
>                 Key: WICKET-3004
>                 URL: https://issues.apache.org/jira/browse/WICKET-3004
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>            Reporter: Peter Ertl
>            Priority: Critical
>         Attachments: broken-url-when-never-redirecting.patch
>
>
> When using RedirectPolicy.NEVER_REDIRECT the WebPageRenderer uses the URL of the __target__ page instead of the current URL. This is wrong as the target page URL will never be visible in the address bar of the browser as no redirect will happen.
> In consequence all references to the page (scripts, images, etc) are potentially broken, at least when the source and target url have different segment sizes. In this case the number of '../' for creating relative URL's will be wrong and the links are broken.
> patch is attached.

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