You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Serban Balamaci (JIRA)" <ji...@apache.org> on 2011/04/21 23:44:05 UTC
[jira] [Commented] (WICKET-3631) invoking setResponsePage after
setting cookie results in cookie not being created(no Set-Cookie header
being sent to the client).
[ https://issues.apache.org/jira/browse/WICKET-3631?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13022930#comment-13022930 ]
Serban Balamaci commented on WICKET-3631:
-----------------------------------------
Also attached a print screen from the browser.
Cookie is not being set on redirect.
I've modified the code locally to not follow redirects:
Start.java
//click link method
getMethod = new GetMethod("http://localhost:" + port + "/" + linkHref);
getMethod.setFollowRedirects(false);
code = httpClient.executeMethod(getMethod);
System.out.println("Request response code " + code);
Header[] headers = getMethod.getResponseHeaders();
Still no Set-Cookie header with the response code 302.
> invoking setResponsePage after setting cookie results in cookie not being created(no Set-Cookie header being sent to the client).
> ---------------------------------------------------------------------------------------------------------------------------------
>
> Key: WICKET-3631
> URL: https://issues.apache.org/jira/browse/WICKET-3631
> Project: Wicket
> Issue Type: Bug
> Affects Versions: 1.5-RC3
> Reporter: Serban Balamaci
> Attachments: wicket-cookie.tar.gz
>
>
> invoking setResponsePage after setting cookie results in Set-Cookie header not being sent to the client.
> add(new Link("create-cookie") {
> @Override
> public void onClick() {
> CookieUtils cookieUtils = new CookieUtils();
> cookieUtils.getSettings().setMaxAge(60 * 60 * 24 * 7); //7 days expiration
> cookieUtils.save("rememberme", "john");
> //by adding the call to setResponsePage(TestPage2.class);
> //cookie will not be created
> //comment the line below and cookie is being created
> setResponsePage(TestPage2.class);
> }
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira