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

Jörn Zaefferer commented on WICKET-1886:
----------------------------------------

Thanks Timo, but that doesn't fix it.

I think the problem is setupRequestAndResponse isn't called "often enough". The 
flow seems to be like this:

setup
add cookie to response
try to read previous cookie from request -> missing, therefore write new cookie
setup

So between rendering a page and submit a form and processing the submit, 
setupRequestAndResponse isn't called.

So in that respect, SecureForm needs to read a cookie from the request just 
after it was written to the response.

The WicketTesterTest is insufficient, as it never reads a cookie from the 
request after setting it to the response...

> WicketTester Cookie handling
> ----------------------------
>
>                 Key: WICKET-1886
>                 URL: https://issues.apache.org/jira/browse/WICKET-1886
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.3.5, 1.4-RC1
>            Reporter: Jörn Zaefferer
>            Assignee: Timo Rantalaiho
>             Fix For: 1.3.6, 1.4-RC2
>
>         Attachments: CookieTest.java, patch-WICKET-1886.diff, 
> WICKET-1886__SecureForm_and_failing_test.patch
>
>
> While trying to test my SecureForm implementation 
> (https://issues.apache.org/jira/browse/WICKET-1885) with WicketTester I ran 
> into this issue: A cookie set in the response never shows up in the "next" 
> request, because both have their own lists of cookies that aren't shared.
> Afaik both should share the same List instance to handle cookies. That way 
> its possible to set a cookie in the response and read it from the request.
> A simple testcase is attached.

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