You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "bernard (JIRA)" <ji...@apache.org> on 2010/08/18 07:15:17 UTC

[jira] Created: (WICKET-2999) Packaged Resource URLs encoded with jsessionid

Packaged Resource URLs encoded with jsessionid
----------------------------------------------

                 Key: WICKET-2999
                 URL: https://issues.apache.org/jira/browse/WICKET-2999
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.4.10
         Environment: GlassFish 3.01
            Reporter: bernard


Packaged Resource URLs encoded with jsessionid even with Browser Cookie Support

With the provided testcase (this works in almost any testcase):
- Remove browser cookies for the test domain.
- Click on link "Wicket".
+ The browser hits the the wicket application for the first time with no cookie.
+ The application responds with a 302 response with a cookie, for a URL containing jsessionid.
+ The browser receives the cookie with the response and sends another request for a URL containing jsessionid.
+ The request contains the cookie header.

Expected behavior from now on:

The application knows that the browser has cookie support and should not rewrite URLs in links in the content.

Actual behavior:

The application responds with content where links contain jsessionid eg
<script type="text/javascript" src="resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js;jsessionid=3884e
<form wicket:id="testForm" action=";jsessionid=388...

Two things: Form submit URLs and packaged resource URLs.

I guess the problem is not necessarily URL rewriting in all cases because the URL of the page must contain jsessionid, and that this URL may have been copied as a whole when building the submit URL of the form.

However, the jsessionid in packaged resources leads to double-fetching of resources such as wicket-event.js with jsessionid in the URL and without it which breaks browser cache behavior.

I am filing this as NetBeans project just in case it happens only in combination with GlassFish.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2999) Packaged Resource URLs encoded with jsessionid

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

Igor Vaynberg commented on WICKET-2999:
---------------------------------------

in 1.4 a potential way to implement it would be to have an ISessionIndependentResourceReference mixin and make packagedresourcereference implement it. then, when we generate a url for a resource reference we check if it implements this and do not pass the generated url through response.encode() so jsessionid is not appended, or use our urlutils to strip it.

in 1.5 we can most likely bake this right into resourcereference as an overridable method that returns a boolean, like boolean requiresSession() { return true; }

> Packaged Resource URLs encoded with jsessionid
> ----------------------------------------------
>
>                 Key: WICKET-2999
>                 URL: https://issues.apache.org/jira/browse/WICKET-2999
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.10
>         Environment: GlassFish 3.01
>            Reporter: bernard
>         Attachments: jsessionidInPackagedResources.zip
>
>
> Packaged Resource URLs encoded with jsessionid even with Browser Cookie Support
> With the provided testcase (this works in almost any testcase):
> - Remove browser cookies for the test domain.
> - Click on link "Wicket".
> + The browser hits the the wicket application for the first time with no cookie.
> + The application responds with a 302 response with a cookie, for a URL containing jsessionid.
> + The browser receives the cookie with the response and sends another request for a URL containing jsessionid.
> + The request contains the cookie header.
> Expected behavior from now on:
> The application knows that the browser has cookie support and should not rewrite URLs in links in the content.
> Actual behavior:
> The application responds with content where links contain jsessionid eg
> <script type="text/javascript" src="resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js;jsessionid=3884e
> <form wicket:id="testForm" action=";jsessionid=388...
> Two things: Form submit URLs and packaged resource URLs.
> I guess the problem is not necessarily URL rewriting in all cases because the URL of the page must contain jsessionid, and that this URL may have been copied as a whole when building the submit URL of the form.
> However, the jsessionid in packaged resources leads to double-fetching of resources such as wicket-event.js with jsessionid in the URL and without it which breaks browser cache behavior.
> I am filing this as NetBeans project just in case it happens only in combination with GlassFish.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-2999) Packaged Resource URLs encoded with jsessionid

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

bernard updated WICKET-2999:
----------------------------

    Attachment: jsessionidInPackagedResources.zip

NetBeans project

> Packaged Resource URLs encoded with jsessionid
> ----------------------------------------------
>
>                 Key: WICKET-2999
>                 URL: https://issues.apache.org/jira/browse/WICKET-2999
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.10
>         Environment: GlassFish 3.01
>            Reporter: bernard
>         Attachments: jsessionidInPackagedResources.zip
>
>
> Packaged Resource URLs encoded with jsessionid even with Browser Cookie Support
> With the provided testcase (this works in almost any testcase):
> - Remove browser cookies for the test domain.
> - Click on link "Wicket".
> + The browser hits the the wicket application for the first time with no cookie.
> + The application responds with a 302 response with a cookie, for a URL containing jsessionid.
> + The browser receives the cookie with the response and sends another request for a URL containing jsessionid.
> + The request contains the cookie header.
> Expected behavior from now on:
> The application knows that the browser has cookie support and should not rewrite URLs in links in the content.
> Actual behavior:
> The application responds with content where links contain jsessionid eg
> <script type="text/javascript" src="resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js;jsessionid=3884e
> <form wicket:id="testForm" action=";jsessionid=388...
> Two things: Form submit URLs and packaged resource URLs.
> I guess the problem is not necessarily URL rewriting in all cases because the URL of the page must contain jsessionid, and that this URL may have been copied as a whole when building the submit URL of the form.
> However, the jsessionid in packaged resources leads to double-fetching of resources such as wicket-event.js with jsessionid in the URL and without it which breaks browser cache behavior.
> I am filing this as NetBeans project just in case it happens only in combination with GlassFish.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2999) Packaged Resource URLs encoded with jsessionid

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

Igor Vaynberg commented on WICKET-2999:
---------------------------------------

seems to work properly in 1.5

> Packaged Resource URLs encoded with jsessionid
> ----------------------------------------------
>
>                 Key: WICKET-2999
>                 URL: https://issues.apache.org/jira/browse/WICKET-2999
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.10
>         Environment: GlassFish 3.01
>            Reporter: bernard
>         Attachments: jsessionidInPackagedResources.zip
>
>
> Packaged Resource URLs encoded with jsessionid even with Browser Cookie Support
> With the provided testcase (this works in almost any testcase):
> - Remove browser cookies for the test domain.
> - Click on link "Wicket".
> + The browser hits the the wicket application for the first time with no cookie.
> + The application responds with a 302 response with a cookie, for a URL containing jsessionid.
> + The browser receives the cookie with the response and sends another request for a URL containing jsessionid.
> + The request contains the cookie header.
> Expected behavior from now on:
> The application knows that the browser has cookie support and should not rewrite URLs in links in the content.
> Actual behavior:
> The application responds with content where links contain jsessionid eg
> <script type="text/javascript" src="resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js;jsessionid=3884e
> <form wicket:id="testForm" action=";jsessionid=388...
> Two things: Form submit URLs and packaged resource URLs.
> I guess the problem is not necessarily URL rewriting in all cases because the URL of the page must contain jsessionid, and that this URL may have been copied as a whole when building the submit URL of the form.
> However, the jsessionid in packaged resources leads to double-fetching of resources such as wicket-event.js with jsessionid in the URL and without it which breaks browser cache behavior.
> I am filing this as NetBeans project just in case it happens only in combination with GlassFish.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2999) Packaged Resource URLs encoded with jsessionid

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

Igor Vaynberg commented on WICKET-2999:
---------------------------------------

actually isStateless() would be a better method name

> Packaged Resource URLs encoded with jsessionid
> ----------------------------------------------
>
>                 Key: WICKET-2999
>                 URL: https://issues.apache.org/jira/browse/WICKET-2999
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.10
>         Environment: GlassFish 3.01
>            Reporter: bernard
>         Attachments: jsessionidInPackagedResources.zip
>
>
> Packaged Resource URLs encoded with jsessionid even with Browser Cookie Support
> With the provided testcase (this works in almost any testcase):
> - Remove browser cookies for the test domain.
> - Click on link "Wicket".
> + The browser hits the the wicket application for the first time with no cookie.
> + The application responds with a 302 response with a cookie, for a URL containing jsessionid.
> + The browser receives the cookie with the response and sends another request for a URL containing jsessionid.
> + The request contains the cookie header.
> Expected behavior from now on:
> The application knows that the browser has cookie support and should not rewrite URLs in links in the content.
> Actual behavior:
> The application responds with content where links contain jsessionid eg
> <script type="text/javascript" src="resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js;jsessionid=3884e
> <form wicket:id="testForm" action=";jsessionid=388...
> Two things: Form submit URLs and packaged resource URLs.
> I guess the problem is not necessarily URL rewriting in all cases because the URL of the page must contain jsessionid, and that this URL may have been copied as a whole when building the submit URL of the form.
> However, the jsessionid in packaged resources leads to double-fetching of resources such as wicket-event.js with jsessionid in the URL and without it which breaks browser cache behavior.
> I am filing this as NetBeans project just in case it happens only in combination with GlassFish.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WICKET-2999) Packaged Resource URLs encoded with jsessionid

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

Igor Vaynberg resolved WICKET-2999.
-----------------------------------

         Assignee: Igor Vaynberg
    Fix Version/s: 1.4.11
       Resolution: Fixed

> Packaged Resource URLs encoded with jsessionid
> ----------------------------------------------
>
>                 Key: WICKET-2999
>                 URL: https://issues.apache.org/jira/browse/WICKET-2999
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.10
>         Environment: GlassFish 3.01
>            Reporter: bernard
>            Assignee: Igor Vaynberg
>             Fix For: 1.4.11
>
>         Attachments: jsessionidInPackagedResources.zip
>
>
> Packaged Resource URLs encoded with jsessionid even with Browser Cookie Support
> With the provided testcase (this works in almost any testcase):
> - Remove browser cookies for the test domain.
> - Click on link "Wicket".
> + The browser hits the the wicket application for the first time with no cookie.
> + The application responds with a 302 response with a cookie, for a URL containing jsessionid.
> + The browser receives the cookie with the response and sends another request for a URL containing jsessionid.
> + The request contains the cookie header.
> Expected behavior from now on:
> The application knows that the browser has cookie support and should not rewrite URLs in links in the content.
> Actual behavior:
> The application responds with content where links contain jsessionid eg
> <script type="text/javascript" src="resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js;jsessionid=3884e
> <form wicket:id="testForm" action=";jsessionid=388...
> Two things: Form submit URLs and packaged resource URLs.
> I guess the problem is not necessarily URL rewriting in all cases because the URL of the page must contain jsessionid, and that this URL may have been copied as a whole when building the submit URL of the form.
> However, the jsessionid in packaged resources leads to double-fetching of resources such as wicket-event.js with jsessionid in the URL and without it which breaks browser cache behavior.
> I am filing this as NetBeans project just in case it happens only in combination with GlassFish.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.