Hi,

as someone may has noticed there is a bug in the WicketTester cookie handling ( https://issues.apache.org/jira/browse/WICKET-5147). I wrote some tests to make things clear, but in a talk with Martin we got a little bit suspicious about the way WicketTester should handle this.

Two scenarios are possible (or more?):

1. remember cookies from server, forget cookies from client:
- you can set any cookies you like in tester.getRequest()
- any cookies from request are send to the page
- you can set any cookies you like in the response
- after the response is done, every cookie set by the server is remembered for further requests - if you add new cookies to tester.getRequest() they can overwrite any remembered response cookies
- the cookies set in an old request are not copied into new requests

2. remember cookies from server and from client:
- you can set any cookies you like in tester.getRequest()
- any cookies from request are send to the page
- you can set any cookies you like in the response
- after the response is done, every cookie set by the server and from the last request is set to the new request - you will see all cookies in tester.getRequest() and can change these before the next request is started

What do you think?

--
Michael Mosmann

Reply via email to