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 18:36:05 UTC

[jira] [Created] (WICKET-3631) set

set
---

                 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




--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WICKET-3631) invoking setResponsePage after setting cookie results in cookie not being created

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

Serban Balamaci updated WICKET-3631:
------------------------------------

    Description: 
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
                setResponsePage(TestPage2.class);
           }
        Summary: invoking setResponsePage after setting cookie results in cookie not being created  (was: set)

> invoking setResponsePage after setting cookie results in cookie not being created
> ---------------------------------------------------------------------------------
>
>                 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
>
> 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
>                 setResponsePage(TestPage2.class);
>            }

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WICKET-3631) invoking setResponsePage after setting cookie results in cookie not being created(no Set-Cookie header being sent to the client).

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

Serban Balamaci updated WICKET-3631:
------------------------------------

    Summary: invoking setResponsePage after setting cookie results in cookie not being created(no Set-Cookie header being sent to the client).  (was: invoking setResponsePage after setting cookie results in cookie not being created(no Set-Cookie being sent to the client).)

> 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

[jira] [Commented] (WICKET-3631) invoking setResponsePage after setting cookie results in cookie not being created(no Set-Cookie header being sent to the client).

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

Martin Grigorov commented on WICKET-3631:
-----------------------------------------

I'm testing on trunk and it works.
The ticket is duplicate of WICKET-3576.

> 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: no-cookie.png, 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

[jira] [Updated] (WICKET-3631) invoking setResponsePage after setting cookie results in cookie not being created(no Set-Cookie header being sent to the client).

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

Serban Balamaci updated WICKET-3631:
------------------------------------

    Attachment: no-cookie.png

> 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: no-cookie.png, 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

[jira] [Updated] (WICKET-3631) invoking setResponsePage after setting cookie results in cookie not being created(no Set-Cookie being sent to the client).

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

Serban Balamaci updated WICKET-3631:
------------------------------------

    Description: 
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);
           }

  was:
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
                setResponsePage(TestPage2.class);
           }


> invoking setResponsePage after setting cookie results in cookie not being created(no Set-Cookie 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

[jira] [Updated] (WICKET-3631) invoking setResponsePage after setting cookie results in cookie not being created

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

Serban Balamaci updated WICKET-3631:
------------------------------------

    Attachment: wicket-cookie.tar.gz

Call Start.java for test case. Also uncomment setResponsePage in HomePage.java and Set-Cookie will be returned

> invoking setResponsePage after setting cookie results in cookie not being created
> ---------------------------------------------------------------------------------
>
>                 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
>                 setResponsePage(TestPage2.class);
>            }

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (WICKET-3631) invoking setResponsePage after setting cookie results in cookie not being created(no Set-Cookie header being sent to the client).

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

Martin Grigorov resolved WICKET-3631.
-------------------------------------

    Resolution: Invalid

There is no problem here.
The cookie is set in the first response - the one that makes the redirect.
And it stays in the browser until expired or deleted.
Check it with real browser and see. The problem is in your code with httpclient.

> 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

[jira] [Updated] (WICKET-3631) invoking setResponsePage after setting cookie results in cookie not being created(no Set-Cookie being sent to the client).

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

Serban Balamaci updated WICKET-3631:
------------------------------------

    Summary: invoking setResponsePage after setting cookie results in cookie not being created(no Set-Cookie being sent to the client).  (was: invoking setResponsePage after setting cookie results in cookie not being created)

> invoking setResponsePage after setting cookie results in cookie not being created(no Set-Cookie 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
>                 setResponsePage(TestPage2.class);
>            }

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-3631) invoking setResponsePage after setting cookie results in cookie not being created(no Set-Cookie header being sent to the client).

Posted by "Serban Balamaci (JIRA)" <ji...@apache.org>.
    [ 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