tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Smith <d...@cornell.edu>
Subject Re: Does HTTPRequest.getParameter() return encoded or decoded?
Date Thu, 05 Jun 2008 16:35:06 GMT
Correct.  With regard to URI encoded GET requests, what you get from 
request.getParameter() is already decoded for %nn character encoding 
among others.  No need to decode it again.

--David

Mark H. Wood wrote:

>Sorry, I didn't fully specify the problem.  I do refer to
>URI-(en|de)coding, not to character encoding issues.
>
>So, if I've understood the answers I've seen so far, the value
>returned by getParameter() should *not* be subjected to URI-decoding,
>because it has already been URI-decoded and doing so again would lead to
>trouble with a parameter value which, before URI-encoding, contained a
>percent character.
>
>I'm debugging code we got from elsewhere which URI-decodes stuff it
>got from getParameter(), and as I am not very familiar with the code
>in question and am only a beginner in working with servlet code myself
>I want to be very sure there is not a good reason for these calls.  I
>think now I'm sure enough to take them out.  Thanks!
>
>  
>


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


Mime
View raw message