[ 
https://issues.apache.org/jira/browse/WICKET-3339?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martijn Dashorst reopened WICKET-3339:
--------------------------------------


This breaks (existing) expectations about when a redirect happens. REDIRECT_* 
should always redirect after a post IMO, regardless of whether the rendered 
page is stateless or not.

In my program, I perform a setResponsePage(FooPage.class, new PageParameters()) 
in a form submit (POST) of a login page. At the end of the request, the page is 
rendered directly but no redirect has happened. This is weird, since I expected 
a redirect. Furthermore, the resulting markup doesn't contain correct resource 
links.

Request URL:http://localhost:8080/wicket/page?5-1.IFormSubmitListener-form
Request Method:POST
Status Code:200 OK
Request Headers


<!DOCTYPE html>
<html xmlns:wicket>
<head>
        <meta charset="utf-8">
        <link rel="stylesheet" type="text/css" href="style/style.css" 
media="screen" title="no title" charset="utf-8"/>
</head>
<body>

The response is still at URL:  
http://localhost:8080/wicket/page?5-1.IFormSubmitListener-form

Somehow the href for the style does not reflect the relative path necessary for 
both the current URL (under /wicket/page) nor (should it work, the redirect 
URL, under /lunch/vandaag).



> Url interception doesn't work if the "intercepting" page is stateless
> ---------------------------------------------------------------------
>
>                 Key: WICKET-3339
>                 URL: https://issues.apache.org/jira/browse/WICKET-3339
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5-M3
>            Reporter: Martin Grigorov
>            Assignee: Martin Grigorov
>             Fix For: 1.5-RC1
>
>
> wicket-examples -> authentication2 is broken.
> The problem is that trying to request Home page ("/") is not allowed for not 
> authenticated users and the security strategy intercepts the request and 
> renders Sign2 page 
> ("wicket/bookmarkable/org.apache.wicket.examples.authentication2.SignIn2") 
> and later WebPageRenderer directly renders Sign2 page in the current response 
> because this page is stateless (redirect_to_xyz is not used for stateless 
> pages).
> The final problem is that the relative urls in the page are broken because 
> they were calculated against 
> "wicket/bookmarkable/org.apache.wicket.examples.authentication2.SignIn2" but 
> the browser still uses "/".

-- 
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