[ 
https://issues.apache.org/jira/browse/TAPESTRY-2187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12575447#action_12575447
 ] 

Fernando commented on TAPESTRY-2187:
------------------------------------

But the url in your test is doubly encoded. Which is what I see within the html 
page.. but the browser sends back a url that has been decoded once already, 
something like:

http://localhost:8080/target/betty/wimla/betty%2Fwilma/...............

( What are the %E8, %8A, %B1, %E5, %AD, %90 characters? )


Which if you put debug on request.getServletPath(), you'll see that tomcat and 
jetty deal with it differently.  One prints out the "%2F" the other prints out 
"/" instead, thus confusing the whole page/context parsing.

-----

The Jetty 5.1 that I run within eclipse demonstrates this clearly:

URL coming into server: 
/fbracket/start.canvaslayout.analyticsiframe:hbx/Start/%2Ffbracket/M030?fb_sig_in_i........
The context parsed: start.canvaslayout.analyticsiframe:hbx; [ Start, , 
fbracket, M030 ]

And this works properly when running under Tomcat 5.5

-----

I had a discussion with the Jetty guys.  They complain that it's actually 
Tomcat not working decoding stuff when it should be decoding stuff..  You can 
look at the discussion here.. I have yet to talk to tomcat guys.

http://jira.codehaus.org/browse/JETTY-516

Not sure what to do about it, unless you want to change how tapestry parses out 
the page by looking at requestURI instead of servletPath/pathInfo.  Or change 
the way the "%" is encoded in the context arguments..


> Context Parameter Encoding confuses Jetty Server, use non UrlEncoding.
> ----------------------------------------------------------------------
>
>                 Key: TAPESTRY-2187
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2187
>             Project: Tapestry
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.0.11
>            Reporter: Fernando
>
> TapestryInternalUtils.escapePercentAndSlash escapes the Percent and Slash 
> characters using URL encoding.  This confuses Jetty, and could confuse 
> browsers and other servers because of unknown times of encoding/decoding done 
> by browsers and servers...
> I propose to change the constants in TapestryInternalUtils:
>     private static final String ENCODED_PERCENT = "%25";
>     private static final String ENCODED_SLASH = "%2F";
> to use a different escape character, maybe one of the unreserved characters: 
> "-", "_", ".", "~"; then make sure to encode that character as well..
> so ENCODED_PERCENT would be ~25, ENCODED_SLASH would be ~2F
> and we would add ENCODED_TILDE to be ~7E
> http://en.wikipedia.org/wiki/Percent-encoding

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to