You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Jens Zastrow (JIRA)" <ji...@apache.org> on 2012/07/09 14:01:36 UTC

[jira] [Created] (WICKET-4645) encodeURL broken on Tomcat 7.0.28

Jens Zastrow created WICKET-4645:
------------------------------------

             Summary: encodeURL broken on Tomcat 7.0.28
                 Key: WICKET-4645
                 URL: https://issues.apache.org/jira/browse/WICKET-4645
             Project: Wicket
          Issue Type: Bug
    Affects Versions: 6.0.0-beta2
            Reporter: Jens Zastrow


During page transition wicket used to encode an '../../tisch' which results in an exception:

Caused by: java.lang.IllegalArgumentException
	at org.apache.catalina.connector.Response.normalize(Response.java:1799)

The transition (within an ajax call) :

http://localhost:8080/wicket/bookmarkable/de.test.pool.manage.ManagePool?11
http://localhost:8080/tisch

IMHO the double parent ".." is correct

There exists already an bugzilla issue created but rejected as invalid https://issues.apache.org/bugzilla/show_bug.cgi?id=53469.

If the wicket code works as expected there must be an error in the tomcat. 
Maybe the wicket development team has closer access to the tomcat developers :-)



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Reopened] (WICKET-4645) encodeURL broken on Tomcat 7.0.28

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

Martin Grigorov reopened WICKET-4645:
-------------------------------------


Some more testing needs to be done here. UrlRenderer's baseUrl miss the contextPath and filterPath and this makes the resolved relative url invalid. 
                
> encodeURL broken on Tomcat 7.0.28
> ---------------------------------
>
>                 Key: WICKET-4645
>                 URL: https://issues.apache.org/jira/browse/WICKET-4645
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.0.0-beta2
>            Reporter: Jens Zastrow
>            Assignee: Martin Grigorov
>             Fix For: 6.0.1, 1.5.9
>
>         Attachments: test.zip, wicket-4645.zip
>
>
> During page transition wicket used to encode an '../../tisch' which results in an exception:
> Caused by: java.lang.IllegalArgumentException
> 	at org.apache.catalina.connector.Response.normalize(Response.java:1799)
> The transition (within an ajax call) :
> http://localhost:8080/wicket/bookmarkable/de.test.pool.manage.ManagePool?11
> http://localhost:8080/tisch
> IMHO the double parent ".." is correct
> There exists already an bugzilla issue created but rejected as invalid https://issues.apache.org/bugzilla/show_bug.cgi?id=53469.
> If the wicket code works as expected there must be an error in the tomcat. 
> Maybe the wicket development team has closer access to the tomcat developers :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-4645) encodeURL broken on Tomcat 7.0.28

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

Martin Grigorov commented on WICKET-4645:
-----------------------------------------

REDIRECT_TO_BUFFER (the default strategy) is broken with the new checks in Tomcat if your application needs to encode jsessionid in the url instead of using a cookie.
Use REDIRECT_TO_RENDER until there is a solution.

MyApp#init() {
   ...
   getRequestCycleSettings().setRenderStrategy(IRequestCycleSettings.RenderStrategy.REDIRECT_TO_RENDER)
}
                
> encodeURL broken on Tomcat 7.0.28
> ---------------------------------
>
>                 Key: WICKET-4645
>                 URL: https://issues.apache.org/jira/browse/WICKET-4645
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.0.0-beta2
>            Reporter: Jens Zastrow
>         Attachments: test.zip, wicket-4645.zip
>
>
> During page transition wicket used to encode an '../../tisch' which results in an exception:
> Caused by: java.lang.IllegalArgumentException
> 	at org.apache.catalina.connector.Response.normalize(Response.java:1799)
> The transition (within an ajax call) :
> http://localhost:8080/wicket/bookmarkable/de.test.pool.manage.ManagePool?11
> http://localhost:8080/tisch
> IMHO the double parent ".." is correct
> There exists already an bugzilla issue created but rejected as invalid https://issues.apache.org/bugzilla/show_bug.cgi?id=53469.
> If the wicket code works as expected there must be an error in the tomcat. 
> Maybe the wicket development team has closer access to the tomcat developers :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-4645) encodeURL broken on Tomcat 7.0.28

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

Thijs Vonk commented on WICKET-4645:
------------------------------------

Hi Martin,
I was the one who filed the issue at tomcat.
I'll try to create a small test case. And attach it to this and the bugzilla ticket.
                
> encodeURL broken on Tomcat 7.0.28
> ---------------------------------
>
>                 Key: WICKET-4645
>                 URL: https://issues.apache.org/jira/browse/WICKET-4645
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.0.0-beta2
>            Reporter: Jens Zastrow
>
> During page transition wicket used to encode an '../../tisch' which results in an exception:
> Caused by: java.lang.IllegalArgumentException
> 	at org.apache.catalina.connector.Response.normalize(Response.java:1799)
> The transition (within an ajax call) :
> http://localhost:8080/wicket/bookmarkable/de.test.pool.manage.ManagePool?11
> http://localhost:8080/tisch
> IMHO the double parent ".." is correct
> There exists already an bugzilla issue created but rejected as invalid https://issues.apache.org/bugzilla/show_bug.cgi?id=53469.
> If the wicket code works as expected there must be an error in the tomcat. 
> Maybe the wicket development team has closer access to the tomcat developers :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (WICKET-4645) encodeURL broken on Tomcat 7.0.28

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

Emond Papegaaij updated WICKET-4645:
------------------------------------

    Fix Version/s:     (was: 6.0.1)
                   6.1.0
    
> encodeURL broken on Tomcat 7.0.28
> ---------------------------------
>
>                 Key: WICKET-4645
>                 URL: https://issues.apache.org/jira/browse/WICKET-4645
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.0.0-beta2
>            Reporter: Jens Zastrow
>            Assignee: Martin Grigorov
>             Fix For: 6.1.0, 1.5.9
>
>         Attachments: test.zip, wicket-4645.zip
>
>
> During page transition wicket used to encode an '../../tisch' which results in an exception:
> Caused by: java.lang.IllegalArgumentException
> 	at org.apache.catalina.connector.Response.normalize(Response.java:1799)
> The transition (within an ajax call) :
> http://localhost:8080/wicket/bookmarkable/de.test.pool.manage.ManagePool?11
> http://localhost:8080/tisch
> IMHO the double parent ".." is correct
> There exists already an bugzilla issue created but rejected as invalid https://issues.apache.org/bugzilla/show_bug.cgi?id=53469.
> If the wicket code works as expected there must be an error in the tomcat. 
> Maybe the wicket development team has closer access to the tomcat developers :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WICKET-4645) encodeURL broken on Tomcat 7.0.28

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

Marek Šabo updated WICKET-4645:
-------------------------------

    Attachment: UrlRendererTest.java

Hello,

I've attached test file with added unit test that fails due to a change to UrlRenderer in commit dda3eea1911dab0b58846221ae22bf795a03fd12

Now resource URL get their context and filter paths stripped and replaced with "./" - this leads to URL's being out of sync with actual resource locations in portal (portlet container).
                
> encodeURL broken on Tomcat 7.0.28
> ---------------------------------
>
>                 Key: WICKET-4645
>                 URL: https://issues.apache.org/jira/browse/WICKET-4645
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.0.0-beta2
>            Reporter: Jens Zastrow
>            Assignee: Martin Grigorov
>             Fix For: 6.1.0, 1.5.9
>
>         Attachments: test.zip, UrlRendererTest.java, wicket-4645.zip
>
>
> During page transition wicket used to encode an '../../tisch' which results in an exception:
> Caused by: java.lang.IllegalArgumentException
> 	at org.apache.catalina.connector.Response.normalize(Response.java:1799)
> The transition (within an ajax call) :
> http://localhost:8080/wicket/bookmarkable/de.test.pool.manage.ManagePool?11
> http://localhost:8080/tisch
> IMHO the double parent ".." is correct
> There exists already an bugzilla issue created but rejected as invalid https://issues.apache.org/bugzilla/show_bug.cgi?id=53469.
> If the wicket code works as expected there must be an error in the tomcat. 
> Maybe the wicket development team has closer access to the tomcat developers :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WICKET-4645) encodeURL broken on Tomcat 7.0.28

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

Pedro Santos updated WICKET-4645:
---------------------------------

    Attachment: wicket-4645.zip

quickstart simulating the issue with Wicket 6
                
> encodeURL broken on Tomcat 7.0.28
> ---------------------------------
>
>                 Key: WICKET-4645
>                 URL: https://issues.apache.org/jira/browse/WICKET-4645
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.0.0-beta2
>            Reporter: Jens Zastrow
>         Attachments: test.zip, wicket-4645.zip
>
>
> During page transition wicket used to encode an '../../tisch' which results in an exception:
> Caused by: java.lang.IllegalArgumentException
> 	at org.apache.catalina.connector.Response.normalize(Response.java:1799)
> The transition (within an ajax call) :
> http://localhost:8080/wicket/bookmarkable/de.test.pool.manage.ManagePool?11
> http://localhost:8080/tisch
> IMHO the double parent ".." is correct
> There exists already an bugzilla issue created but rejected as invalid https://issues.apache.org/bugzilla/show_bug.cgi?id=53469.
> If the wicket code works as expected there must be an error in the tomcat. 
> Maybe the wicket development team has closer access to the tomcat developers :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Comment Edited] (WICKET-4645) encodeURL broken on Tomcat 7.0.28

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

Thijs Vonk edited comment on WICKET-4645 at 7/9/12 12:49 PM:
-------------------------------------------------------------

Hi Martin,
I was the one who filed the issue at tomcat.
I'll try to create a small test case. And attach it to this and the bugzilla ticket. and here
                
      was (Author: thyzz):
    Hi Martin,
I was the one who filed the issue at tomcat.
I'll try to create a small test case. And attach it to this and the bugzilla ticket.
                  
> encodeURL broken on Tomcat 7.0.28
> ---------------------------------
>
>                 Key: WICKET-4645
>                 URL: https://issues.apache.org/jira/browse/WICKET-4645
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.0.0-beta2
>            Reporter: Jens Zastrow
>
> During page transition wicket used to encode an '../../tisch' which results in an exception:
> Caused by: java.lang.IllegalArgumentException
> 	at org.apache.catalina.connector.Response.normalize(Response.java:1799)
> The transition (within an ajax call) :
> http://localhost:8080/wicket/bookmarkable/de.test.pool.manage.ManagePool?11
> http://localhost:8080/tisch
> IMHO the double parent ".." is correct
> There exists already an bugzilla issue created but rejected as invalid https://issues.apache.org/bugzilla/show_bug.cgi?id=53469.
> If the wicket code works as expected there must be an error in the tomcat. 
> Maybe the wicket development team has closer access to the tomcat developers :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WICKET-4645) encodeURL broken on Tomcat 7.0.28

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

Marek Šabo commented on WICKET-4645:
------------------------------------

Hello,

I agree that I get what I ask for with renderRelativeUrl, let me be more specific:

I create JavascriptReferenceHeaderItem. In it's render method it calls private getUrl(), which calls RequectCycle.get().urlFor(). In that method I get correct mappedUrl. Then it's passed to private renderUrl() which calls UrlRenderer's renderUrl() and as the condition shouldRenderAsFull() return false - it is rendered as relative.

shouldRenderAsFull() tests protocol, host and port. Neither of that is in my resource mappedUrl, it looks like "/my-portlets/my-app/wicket/resource/com.foo.bar.portlets.Anchor/res/Style-ver-1352751065000.css".

For now I override render method and provide custom URL but I think we should try to reintroduce this back to Wicket core. Possibly find a spot in UrlRenderer where the removed condition ... return isAbsolute() ? mappedUrl.toString() :... can be reinserted to allow absolute URLs without schema/host/port.

Best regards
                
> encodeURL broken on Tomcat 7.0.28
> ---------------------------------
>
>                 Key: WICKET-4645
>                 URL: https://issues.apache.org/jira/browse/WICKET-4645
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.0.0-beta2
>            Reporter: Jens Zastrow
>            Assignee: Martin Grigorov
>             Fix For: 6.1.0, 1.5.9
>
>         Attachments: test.zip, UrlRendererTest.java, wicket-4645.zip
>
>
> During page transition wicket used to encode an '../../tisch' which results in an exception:
> Caused by: java.lang.IllegalArgumentException
> 	at org.apache.catalina.connector.Response.normalize(Response.java:1799)
> The transition (within an ajax call) :
> http://localhost:8080/wicket/bookmarkable/de.test.pool.manage.ManagePool?11
> http://localhost:8080/tisch
> IMHO the double parent ".." is correct
> There exists already an bugzilla issue created but rejected as invalid https://issues.apache.org/bugzilla/show_bug.cgi?id=53469.
> If the wicket code works as expected there must be an error in the tomcat. 
> Maybe the wicket development team has closer access to the tomcat developers :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-4645) encodeURL broken on Tomcat 7.0.28

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

Martin Grigorov commented on WICKET-4645:
-----------------------------------------

@Jens:
>From the ticket in Tomcat:
"The URL that is being encoded is:
../../resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js?w:lm=1340711670"

1) 'resources' is a the special path for Wicket resources in 1.4. 
In 1.5+ it is wicket/resource/...

2) In Wicket 6 there is no wicket-event.js
There is wicket-event-jquery.js now.


@Both: You see this is an issue with Tomcat, not Wicket one.
As you see Mark Thomas is responsive. Just follow up with him in Tomcat's issue tracker.
                
> encodeURL broken on Tomcat 7.0.28
> ---------------------------------
>
>                 Key: WICKET-4645
>                 URL: https://issues.apache.org/jira/browse/WICKET-4645
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.0.0-beta2
>            Reporter: Jens Zastrow
>         Attachments: test.zip
>
>
> During page transition wicket used to encode an '../../tisch' which results in an exception:
> Caused by: java.lang.IllegalArgumentException
> 	at org.apache.catalina.connector.Response.normalize(Response.java:1799)
> The transition (within an ajax call) :
> http://localhost:8080/wicket/bookmarkable/de.test.pool.manage.ManagePool?11
> http://localhost:8080/tisch
> IMHO the double parent ".." is correct
> There exists already an bugzilla issue created but rejected as invalid https://issues.apache.org/bugzilla/show_bug.cgi?id=53469.
> If the wicket code works as expected there must be an error in the tomcat. 
> Maybe the wicket development team has closer access to the tomcat developers :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WICKET-4645) encodeURL broken on Tomcat 7.0.28

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

Thijs Vonk commented on WICKET-4645:
------------------------------------

Ok so Mark points back to Wicket.
I know 1.4.x is probably eol as soon as Wicket 6 hits the floor (or maybe it even already is). But maybe some pointer where to look?!
 But is there a chance you could have a look. Or point me to the location where I should start digging?
                
> encodeURL broken on Tomcat 7.0.28
> ---------------------------------
>
>                 Key: WICKET-4645
>                 URL: https://issues.apache.org/jira/browse/WICKET-4645
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.0.0-beta2
>            Reporter: Jens Zastrow
>         Attachments: test.zip
>
>
> During page transition wicket used to encode an '../../tisch' which results in an exception:
> Caused by: java.lang.IllegalArgumentException
> 	at org.apache.catalina.connector.Response.normalize(Response.java:1799)
> The transition (within an ajax call) :
> http://localhost:8080/wicket/bookmarkable/de.test.pool.manage.ManagePool?11
> http://localhost:8080/tisch
> IMHO the double parent ".." is correct
> There exists already an bugzilla issue created but rejected as invalid https://issues.apache.org/bugzilla/show_bug.cgi?id=53469.
> If the wicket code works as expected there must be an error in the tomcat. 
> Maybe the wicket development team has closer access to the tomcat developers :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WICKET-4645) encodeURL broken on Tomcat 7.0.28

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

Jens Zastrow commented on WICKET-4645:
--------------------------------------

Have'nt used the version 1.4.x for month.... 

org.apache.wicket.protocol.http.WebApplication [wicket] Started Wicket version 6.0.0-beta2 in DEVELOPMENT mode
                
> encodeURL broken on Tomcat 7.0.28
> ---------------------------------
>
>                 Key: WICKET-4645
>                 URL: https://issues.apache.org/jira/browse/WICKET-4645
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.0.0-beta2
>            Reporter: Jens Zastrow
>         Attachments: test.zip
>
>
> During page transition wicket used to encode an '../../tisch' which results in an exception:
> Caused by: java.lang.IllegalArgumentException
> 	at org.apache.catalina.connector.Response.normalize(Response.java:1799)
> The transition (within an ajax call) :
> http://localhost:8080/wicket/bookmarkable/de.test.pool.manage.ManagePool?11
> http://localhost:8080/tisch
> IMHO the double parent ".." is correct
> There exists already an bugzilla issue created but rejected as invalid https://issues.apache.org/bugzilla/show_bug.cgi?id=53469.
> If the wicket code works as expected there must be an error in the tomcat. 
> Maybe the wicket development team has closer access to the tomcat developers :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WICKET-4645) encodeURL broken on Tomcat 7.0.28

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

Martin Grigorov commented on WICKET-4645:
-----------------------------------------

Actually, I was the one who requested this normalization in Tomcat.
Let's see whether we can convince the Tomcat devs that the urls above are OK.
                
> encodeURL broken on Tomcat 7.0.28
> ---------------------------------
>
>                 Key: WICKET-4645
>                 URL: https://issues.apache.org/jira/browse/WICKET-4645
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.0.0-beta2
>            Reporter: Jens Zastrow
>
> During page transition wicket used to encode an '../../tisch' which results in an exception:
> Caused by: java.lang.IllegalArgumentException
> 	at org.apache.catalina.connector.Response.normalize(Response.java:1799)
> The transition (within an ajax call) :
> http://localhost:8080/wicket/bookmarkable/de.test.pool.manage.ManagePool?11
> http://localhost:8080/tisch
> IMHO the double parent ".." is correct
> There exists already an bugzilla issue created but rejected as invalid https://issues.apache.org/bugzilla/show_bug.cgi?id=53469.
> If the wicket code works as expected there must be an error in the tomcat. 
> Maybe the wicket development team has closer access to the tomcat developers :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (WICKET-4645) encodeURL broken on Tomcat 7.0.28

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

Thijs Vonk updated WICKET-4645:
-------------------------------

    Attachment: test.zip

This is with wicket 1.4.20 as we are still using that version
install this on tomcat 7.0.28
hit it with http://localhost:8080/test-1, click the link and everything works
do the same with http://localhost:8080/test-1/testpage/param1/value1, then click the link and check you're tomcat log...
                
> encodeURL broken on Tomcat 7.0.28
> ---------------------------------
>
>                 Key: WICKET-4645
>                 URL: https://issues.apache.org/jira/browse/WICKET-4645
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.0.0-beta2
>            Reporter: Jens Zastrow
>         Attachments: test.zip
>
>
> During page transition wicket used to encode an '../../tisch' which results in an exception:
> Caused by: java.lang.IllegalArgumentException
> 	at org.apache.catalina.connector.Response.normalize(Response.java:1799)
> The transition (within an ajax call) :
> http://localhost:8080/wicket/bookmarkable/de.test.pool.manage.ManagePool?11
> http://localhost:8080/tisch
> IMHO the double parent ".." is correct
> There exists already an bugzilla issue created but rejected as invalid https://issues.apache.org/bugzilla/show_bug.cgi?id=53469.
> If the wicket code works as expected there must be an error in the tomcat. 
> Maybe the wicket development team has closer access to the tomcat developers :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Comment Edited] (WICKET-4645) encodeURL broken on Tomcat 7.0.28

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

Marek Šabo edited comment on WICKET-4645 at 11/5/12 3:57 PM:
-------------------------------------------------------------

Hello,

I agree that I get what I ask for with renderRelativeUrl, let me be more specific:

I create JavascriptReferenceHeaderItem. In it's render method it calls private getUrl(), which calls RequectCycle.get().urlFor(). In that method I get correct mappedUrl. Then it's passed to private renderUrl() which calls UrlRenderer's renderUrl() and as the condition shouldRenderAsFull() return false - it is rendered as relative.

shouldRenderAsFull() tests protocol, host and port. Neither of that is in my resource mappedUrl, it looks like "/my-portlets/my-app/wicket/resource/com.foo.bar.portlets.Anchor/res/Style-ver-1352751065000.css".

For now I override render method and provide custom URL but I think we should try to reintroduce this back to Wicket core. Possibly find a spot in UrlRenderer where the removed condition ... return isAbsolute() ? mappedUrl.toString() :... (e.g. UrlRenderer#137) can be reinserted to allow absolute URLs without schema/host/port.

Best regards
                
      was (Author: zeratul):
    Hello,

I agree that I get what I ask for with renderRelativeUrl, let me be more specific:

I create JavascriptReferenceHeaderItem. In it's render method it calls private getUrl(), which calls RequectCycle.get().urlFor(). In that method I get correct mappedUrl. Then it's passed to private renderUrl() which calls UrlRenderer's renderUrl() and as the condition shouldRenderAsFull() return false - it is rendered as relative.

shouldRenderAsFull() tests protocol, host and port. Neither of that is in my resource mappedUrl, it looks like "/my-portlets/my-app/wicket/resource/com.foo.bar.portlets.Anchor/res/Style-ver-1352751065000.css".

For now I override render method and provide custom URL but I think we should try to reintroduce this back to Wicket core. Possibly find a spot in UrlRenderer where the removed condition ... return isAbsolute() ? mappedUrl.toString() :... can be reinserted to allow absolute URLs without schema/host/port.

Best regards
                  
> encodeURL broken on Tomcat 7.0.28
> ---------------------------------
>
>                 Key: WICKET-4645
>                 URL: https://issues.apache.org/jira/browse/WICKET-4645
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.0.0-beta2
>            Reporter: Jens Zastrow
>            Assignee: Martin Grigorov
>             Fix For: 6.1.0, 1.5.9
>
>         Attachments: test.zip, UrlRendererTest.java, wicket-4645.zip
>
>
> During page transition wicket used to encode an '../../tisch' which results in an exception:
> Caused by: java.lang.IllegalArgumentException
> 	at org.apache.catalina.connector.Response.normalize(Response.java:1799)
> The transition (within an ajax call) :
> http://localhost:8080/wicket/bookmarkable/de.test.pool.manage.ManagePool?11
> http://localhost:8080/tisch
> IMHO the double parent ".." is correct
> There exists already an bugzilla issue created but rejected as invalid https://issues.apache.org/bugzilla/show_bug.cgi?id=53469.
> If the wicket code works as expected there must be an error in the tomcat. 
> Maybe the wicket development team has closer access to the tomcat developers :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (WICKET-4645) encodeURL broken on Tomcat 7.0.28

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

Martin Grigorov resolved WICKET-4645.
-------------------------------------

    Resolution: Fixed
    
> encodeURL broken on Tomcat 7.0.28
> ---------------------------------
>
>                 Key: WICKET-4645
>                 URL: https://issues.apache.org/jira/browse/WICKET-4645
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.0.0-beta2
>            Reporter: Jens Zastrow
>            Assignee: Martin Grigorov
>             Fix For: 6.0.1, 1.5.9
>
>         Attachments: test.zip, wicket-4645.zip
>
>
> During page transition wicket used to encode an '../../tisch' which results in an exception:
> Caused by: java.lang.IllegalArgumentException
> 	at org.apache.catalina.connector.Response.normalize(Response.java:1799)
> The transition (within an ajax call) :
> http://localhost:8080/wicket/bookmarkable/de.test.pool.manage.ManagePool?11
> http://localhost:8080/tisch
> IMHO the double parent ".." is correct
> There exists already an bugzilla issue created but rejected as invalid https://issues.apache.org/bugzilla/show_bug.cgi?id=53469.
> If the wicket code works as expected there must be an error in the tomcat. 
> Maybe the wicket development team has closer access to the tomcat developers :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-4645) encodeURL broken on Tomcat 7.0.28

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

Martin Grigorov commented on WICKET-4645:
-----------------------------------------

1.4.x branch is closed. Only security related fixes go in.
Look in the URL coding strategy that is in use.

Or just use Tomcat 7.0.27 until you upgrade to Wicket 6.
                
> encodeURL broken on Tomcat 7.0.28
> ---------------------------------
>
>                 Key: WICKET-4645
>                 URL: https://issues.apache.org/jira/browse/WICKET-4645
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.0.0-beta2
>            Reporter: Jens Zastrow
>         Attachments: test.zip
>
>
> During page transition wicket used to encode an '../../tisch' which results in an exception:
> Caused by: java.lang.IllegalArgumentException
> 	at org.apache.catalina.connector.Response.normalize(Response.java:1799)
> The transition (within an ajax call) :
> http://localhost:8080/wicket/bookmarkable/de.test.pool.manage.ManagePool?11
> http://localhost:8080/tisch
> IMHO the double parent ".." is correct
> There exists already an bugzilla issue created but rejected as invalid https://issues.apache.org/bugzilla/show_bug.cgi?id=53469.
> If the wicket code works as expected there must be an error in the tomcat. 
> Maybe the wicket development team has closer access to the tomcat developers :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WICKET-4645) encodeURL broken on Tomcat 7.0.28

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

Martin Grigorov commented on WICKET-4645:
-----------------------------------------

The produced result looks correct to me:

base url: /my-portlets/my-app/configuration-page
input: /my-portlets/my-app/wicket/resource/com.foo.bar.portlets.Anchor/res/Style-ver-1352751065000.css
output: ./wicket/resource/com.foo.bar.portlets.Anchor/res/Style-ver-1352751065000.css
used method: renderer.renderRelativeUrl(input);

You ask for relative Url and Wicket produces a correct (I think) relative url.

Here is the code that would produce what you need:
String encodedFullUrlString = "/my-portlets/my-app/wicket/resource/com.foo.bar.portlets.Anchor/res/Style-ver-1352751065000.css";
        Url baseUrl = Url.parse("/my-portlets/my-app/configuration-page");
        Url encodedFullUrl = Url.parse(encodedFullUrlString);
	    UrlRenderer renderer = new UrlRenderer(new MockWebRequest(baseUrl));
        String mangledUrl = renderer.renderFullUrl(encodedFullUrl);
	    System.err.println(Url.parse(mangledUrl).toString(Url.StringMode.LOCAL));

                
> encodeURL broken on Tomcat 7.0.28
> ---------------------------------
>
>                 Key: WICKET-4645
>                 URL: https://issues.apache.org/jira/browse/WICKET-4645
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.0.0-beta2
>            Reporter: Jens Zastrow
>            Assignee: Martin Grigorov
>             Fix For: 6.1.0, 1.5.9
>
>         Attachments: test.zip, UrlRendererTest.java, wicket-4645.zip
>
>
> During page transition wicket used to encode an '../../tisch' which results in an exception:
> Caused by: java.lang.IllegalArgumentException
> 	at org.apache.catalina.connector.Response.normalize(Response.java:1799)
> The transition (within an ajax call) :
> http://localhost:8080/wicket/bookmarkable/de.test.pool.manage.ManagePool?11
> http://localhost:8080/tisch
> IMHO the double parent ".." is correct
> There exists already an bugzilla issue created but rejected as invalid https://issues.apache.org/bugzilla/show_bug.cgi?id=53469.
> If the wicket code works as expected there must be an error in the tomcat. 
> Maybe the wicket development team has closer access to the tomcat developers :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Assigned] (WICKET-4645) encodeURL broken on Tomcat 7.0.28

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

Martin Grigorov reassigned WICKET-4645:
---------------------------------------

    Assignee: Martin Grigorov
    
> encodeURL broken on Tomcat 7.0.28
> ---------------------------------
>
>                 Key: WICKET-4645
>                 URL: https://issues.apache.org/jira/browse/WICKET-4645
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.0.0-beta2
>            Reporter: Jens Zastrow
>            Assignee: Martin Grigorov
>         Attachments: test.zip, wicket-4645.zip
>
>
> During page transition wicket used to encode an '../../tisch' which results in an exception:
> Caused by: java.lang.IllegalArgumentException
> 	at org.apache.catalina.connector.Response.normalize(Response.java:1799)
> The transition (within an ajax call) :
> http://localhost:8080/wicket/bookmarkable/de.test.pool.manage.ManagePool?11
> http://localhost:8080/tisch
> IMHO the double parent ".." is correct
> There exists already an bugzilla issue created but rejected as invalid https://issues.apache.org/bugzilla/show_bug.cgi?id=53469.
> If the wicket code works as expected there must be an error in the tomcat. 
> Maybe the wicket development team has closer access to the tomcat developers :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Reopened] (WICKET-4645) encodeURL broken on Tomcat 7.0.28

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

Martin Grigorov reopened WICKET-4645:
-------------------------------------

    
> encodeURL broken on Tomcat 7.0.28
> ---------------------------------
>
>                 Key: WICKET-4645
>                 URL: https://issues.apache.org/jira/browse/WICKET-4645
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.0.0-beta2
>            Reporter: Jens Zastrow
>         Attachments: test.zip, wicket-4645.zip
>
>
> During page transition wicket used to encode an '../../tisch' which results in an exception:
> Caused by: java.lang.IllegalArgumentException
> 	at org.apache.catalina.connector.Response.normalize(Response.java:1799)
> The transition (within an ajax call) :
> http://localhost:8080/wicket/bookmarkable/de.test.pool.manage.ManagePool?11
> http://localhost:8080/tisch
> IMHO the double parent ".." is correct
> There exists already an bugzilla issue created but rejected as invalid https://issues.apache.org/bugzilla/show_bug.cgi?id=53469.
> If the wicket code works as expected there must be an error in the tomcat. 
> Maybe the wicket development team has closer access to the tomcat developers :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Comment Edited] (WICKET-4645) encodeURL broken on Tomcat 7.0.28

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

Thijs Vonk edited comment on WICKET-4645 at 7/9/12 5:45 PM:
------------------------------------------------------------

Ok so Mark points back to Wicket.
I know 1.4.x is probably eol as soon as Wicket 6 hits the floor (or maybe it even already is).
 But is there a chance you could have a look. Or point me to the location where I should start digging?
                
      was (Author: thyzz):
    Ok so Mark points back to Wicket.
I know 1.4.x is probably eol as soon as Wicket 6 hits the floor (or maybe it even already is). But maybe some pointer where to look?!
 But is there a chance you could have a look. Or point me to the location where I should start digging?
                  
> encodeURL broken on Tomcat 7.0.28
> ---------------------------------
>
>                 Key: WICKET-4645
>                 URL: https://issues.apache.org/jira/browse/WICKET-4645
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.0.0-beta2
>            Reporter: Jens Zastrow
>         Attachments: test.zip
>
>
> During page transition wicket used to encode an '../../tisch' which results in an exception:
> Caused by: java.lang.IllegalArgumentException
> 	at org.apache.catalina.connector.Response.normalize(Response.java:1799)
> The transition (within an ajax call) :
> http://localhost:8080/wicket/bookmarkable/de.test.pool.manage.ManagePool?11
> http://localhost:8080/tisch
> IMHO the double parent ".." is correct
> There exists already an bugzilla issue created but rejected as invalid https://issues.apache.org/bugzilla/show_bug.cgi?id=53469.
> If the wicket code works as expected there must be an error in the tomcat. 
> Maybe the wicket development team has closer access to the tomcat developers :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (WICKET-4645) encodeURL broken on Tomcat 7.0.28

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

Martin Grigorov resolved WICKET-4645.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5.9
                   6.0.1

Fixed by making the url absolute before passing it to the web container.
                
> encodeURL broken on Tomcat 7.0.28
> ---------------------------------
>
>                 Key: WICKET-4645
>                 URL: https://issues.apache.org/jira/browse/WICKET-4645
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.0.0-beta2
>            Reporter: Jens Zastrow
>            Assignee: Martin Grigorov
>             Fix For: 6.0.1, 1.5.9
>
>         Attachments: test.zip, wicket-4645.zip
>
>
> During page transition wicket used to encode an '../../tisch' which results in an exception:
> Caused by: java.lang.IllegalArgumentException
> 	at org.apache.catalina.connector.Response.normalize(Response.java:1799)
> The transition (within an ajax call) :
> http://localhost:8080/wicket/bookmarkable/de.test.pool.manage.ManagePool?11
> http://localhost:8080/tisch
> IMHO the double parent ".." is correct
> There exists already an bugzilla issue created but rejected as invalid https://issues.apache.org/bugzilla/show_bug.cgi?id=53469.
> If the wicket code works as expected there must be an error in the tomcat. 
> Maybe the wicket development team has closer access to the tomcat developers :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (WICKET-4645) encodeURL broken on Tomcat 7.0.28

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

Martin Grigorov resolved WICKET-4645.
-------------------------------------

    Resolution: Invalid

As Mark Thomas described in Tomcat's Bugzilla he added unit tests for this and they pass.
Please create a demo app that demonstrates the problem and attach it to their Bugzilla.

Additionally: the URLs you pasted in this ticket are generated by Wicket 1.4, not by Wicket 6.
                
> encodeURL broken on Tomcat 7.0.28
> ---------------------------------
>
>                 Key: WICKET-4645
>                 URL: https://issues.apache.org/jira/browse/WICKET-4645
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.0.0-beta2
>            Reporter: Jens Zastrow
>
> During page transition wicket used to encode an '../../tisch' which results in an exception:
> Caused by: java.lang.IllegalArgumentException
> 	at org.apache.catalina.connector.Response.normalize(Response.java:1799)
> The transition (within an ajax call) :
> http://localhost:8080/wicket/bookmarkable/de.test.pool.manage.ManagePool?11
> http://localhost:8080/tisch
> IMHO the double parent ".." is correct
> There exists already an bugzilla issue created but rejected as invalid https://issues.apache.org/bugzilla/show_bug.cgi?id=53469.
> If the wicket code works as expected there must be an error in the tomcat. 
> Maybe the wicket development team has closer access to the tomcat developers :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira