tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asbachb <mz8lenvp05gy...@gmail.com>
Subject Re: ServletWebRequest.getServletPath() returns strange values on uris with german umlauts
Date Thu, 27 Jan 2011 16:50:07 GMT

Thanks for you reply.

I checked my clients request to tomcat which shows that the umlauts are
correctly replaced with their enities:

GET
"http://localhost:8080/wicket-umlauts-1.0-SNAPSHOT/page/param/v%C3%A4lue-xxx"

This request should be a valid ASCII request and shouldn't be a problem to
decode?



awarnier wrote:
> 
> asbachb wrote:
>> Thank you for you reply.
>> 
>> Sorry for expressing me a little vague. I meant that i alread tried both
>> attributes. 
>> 
>> My used encoding is UTF-8.
>> 
>> Here are the missing sources:
>> 
>> http://old.nabble.com/file/p30775449/wicket-umlauts.zip
>> wicket-umlauts.zip 
>> 
>> 
>> Konstantin Kolinko wrote:
>>> 2011/1/27 asbachb <mz8lenvp05gyb78@gmail.com>:
>>>> Like mentioned in the CharacterEncoding FAQs I already setup
>>>> URIEncoding
>>>> and
>>>> useBodyEncodingForURI attribute in my server.xml configuration.
>>> URIEncoding and useBodyEncodingForURI  are alternatives. Do not use
>>> both at the same time.  My understanding of /docs/config/http.html is
>>> that useBodyEncodingForURI overrides URIEncoding. So, what is your
>>> "body encoding" in this case?
>>>
>>>
> Maybe the first thing to remember is this :
> http://tools.ietf.org/html/rfc2396
> Section : 2.1 URI and non-ASCII characters
> 
> In other words : a URI /does not/ have any specific encoding, nor is there
> any way in the 
> HTTP protocol of specifying one.
> So, whatever you do in terms of interpreting this URI, depends on an
> agreement between the 
> client and the server.
> /If/ you can be sure that all the cients accessing your application will
> always encode the 
> URI of their request using charset/encoding XYZ, /then/ you can decide to
> decode this URI 
> at the server side using the same charset/encoding.
> And otherwise, well, you have a problem.
> And within the limitations of the current HTTP protocol, that problem
> cannot be solved 
> entirely.
> 
> In other words also, the Tomcat attributes useBodyEncodingForURI and
> URIEncoding are a way 
> for you to influence how the server side will decode the URI's, but they
> cannot do 
> anything about how the clients are encoding them.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/ServletWebRequest.getServletPath%28%29-returns-strange-values-on-uris-with-german-umlauts-tp30770590p30778001.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message