cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: Spaces in request parameters: Problems with raw-request-param
Date Mon, 01 Dec 2003 21:42:24 GMT
Hello Tony,

please read the mail at 
http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=106796038708692&w=2. It 
seems to be exactly the same problem. Can you confirm this?

Joerg

On 01.12.2003 19:25, Tony Collen wrote:

> (I am bringing this thread over to -dev to ask the experts for help)
> 
> Kai Benndorf wrote:
> 
>> Hi Tony,
>>
>> i've opened  the following bug:
>>
>> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25102
>>
>> Best Regards
>>
>> Kai
> 
> 
> Alright, due to my limited knowledge of Avalon, and my brain being in a 
> general state of rustiness, I'm having some problems.
> 
> Here's what I know so far:
> 
> - The RawRequestParameterModule is not actually giving raw request 
> parameters (i.e. URL-Encoded)
> 
> Reading from the Javadocs:
>  * RawRequestParameterModule accesses request parameters without
>  * decoding or casting. It uses the get() method instead of the 
> getParameter()
>  * method of the {@link org.apache.cocoon.environment.Request Request} 
> This is useful
>  *  for example in conjunction with uploads.
> 
> - The RRPM uses this to get the request parameter:
> 
>     ObjectModelHelper.getRequest(objectModel).get( pname );
> 
> Alright, so I track down Cocoon's HttpRequest (and also the Request 
> interface).  Looking at both, I see no mention of a contract where 
> Request.get(parameter) must return the parameter's value encoded.
> 
> Looking further into o.a.c.e.h.HttpRequest, I notice:
> - If the request is not a MultipartHttpServletRequest, the following is 
> used:
>     String[] values = req.getParameterValues(name);
> 
> Alright, here, req is a plain old 
> javax.servlet.http.HttpServletRequest.  The Javadocs for 
> getParameterValues says the following:
> 
> "Returns an array of String objects containing all of the values the 
> given request parameter has, or null if the parameter does not exist."
> 
> It says nothing about being encoded.
> 
> AFAIK, the only way to get encoded (or "raw") request parameter values 
> is to look at the raw query string and break it up on & characters, or 
> break it up on the request parameter separator .. I know that PHP allows 
> you to set the parameter separator character to something else (most 
> commonly ';').  But now I'm getting off on a tangent.
> 
> Anybody have suggestions?
> 
> Regards,
> 
> Tony, feeling tired after typing up this long message.


Mime
View raw message