tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: URIs, %nn decoding and error handling
Date Sat, 02 Mar 2013 22:59:06 GMT
2013/3/2 Mark Thomas <markt@apache.org>:
>
>> 3. I remember discussions on the mailing lists regarding whether it is
>> possible to make uri-encoding to be webapp-specific setting.
>
> That is never going to be possible because decoding has to happen before
> mapping.
>

My idea roughly is
1. Let Mapper operate on bytes
2. When registering Context in the mapper, convert its name to bytes
using its encoding.
Use the bytes in the mapper.
3. Use url-decoded but not yet converted to proper encoding URI to map
to a Context
4. Once we know Context, we can convert URI to proper encoding.
5. Map to a Wrapper.

Looking into CoyoteAdapter.postParseRequest(), removing path
parameters from URI happens earlier than url-decoding. So at that
point we know sessionid and can select proper Context among versions.

The idea will break if conversion from chars to bytes were ambiguous
and if such ambiguous chars were used in Context names. The latter is
unlikely.


It is not my itch though. I am using URIEncoding=UTF-8 everywhere.

Best regards,
Konstantin Kolinko

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


Mime
View raw message