How does your customer system handle this?

http://localhost:8080/aSite/aPage?query=I%fear%dead%results

badly, obviously :)

Possible solutions:
1) You can still try in servlet 'aPage' to grab the request using
request.getQueryString() which should returns you "query=hi%everybody"
2) You can write a servlet filter for /* which will create a new
HttpServletRequest Object with parameters you parse in your way from the
getQueryString() above
3) You can open tomcat source, patch the url decoder, and use it

What ever solution is choosen, customer will be bound to a side effect
of error handling in server.

abdurrahman sahin a écrit :

>hi David;
>I am aware of the case. As I stated before Apache2 server properly handles
>that problem and I need that functionality because our customer's system
>built on it.
>
>
>-----Original Message-----
>From: David Delbecq [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, February 01, 2006 11:58 AM
>To: Tomcat Users List
>Subject: Re: percent sign in URI
>
>
>Hello abdurrahman,
>
>Your url is incorrect, replace it with
>http://localhost:8080/aSite/aPage?query=hi%25everybody
>
>According to rfc 1738, 2.2. URL Character Encoding Issues
>
>   Octets must be encoded ..., if the use of the corresponding character is
>unsafe, ...
>   The character "%" is unsafe because it is used for encodings of other
>characters.
>   Thus, only alphanumerics, the special characters "$-_.+!*'(),", and
>reserved characters used for their reserved purposes may be used unencoded
>within a URL.
>
>There is no details in RFC on how to handle badly shaped urls (like % not
>followed by 2 hex digits) and thus your urls should not rely upon this.
>
>Regards.
>
>abdurrahman sahin a écrit :
>
>  
>
>>I realized apache2 web server properyl handles % sign in URIs, i need =
>>exact functionality on tomcat 5 too.
>>When I try to pass a parameter containing % sign, the parameter value on =
>>the server seems null.
>>like
>>http://localhost:8080/aSite/aPage?query=hi%everybody
>>Tomcat 5 cannot handle that, Is there a way to do it with tomcat 5.
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>>    
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>  
>


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

Reply via email to