From dev-return-52340-apmail-cocoon-dev-archive=cocoon.apache.org@cocoon.apache.org Mon Dec 01 21:42:22 2003 Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 61453 invoked from network); 1 Dec 2003 21:42:21 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 1 Dec 2003 21:42:21 -0000 Received: (qmail 33487 invoked by uid 500); 1 Dec 2003 21:42:06 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 33451 invoked by uid 500); 1 Dec 2003 21:42:06 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@cocoon.apache.org Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 33432 invoked from network); 1 Dec 2003 21:42:05 -0000 Received: from unknown (HELO sati.virbus.de) (145.253.246.81) by daedalus.apache.org with SMTP; 1 Dec 2003 21:42:05 -0000 Received: from sati.virbus.de (localhost [127.0.0.1]) by localhost (SMTP Server) with ESMTP id D8AC9166A9C for ; Mon, 1 Dec 2003 22:42:10 +0100 (MET) Received: from gmx.de (a183069.studnetz.uni-leipzig.de [139.18.183.69]) by sati.virbus.de (SMTP Server) with ESMTP id 7AD4D166A72 for ; Mon, 1 Dec 2003 22:42:10 +0100 (MET) Message-ID: <3FCBB5C0.2020609@gmx.de> Date: Mon, 01 Dec 2003 22:42:24 +0100 From: Joerg Heinicke User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: de-de, de, en-us, en-gb, en MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: Spaces in request parameters: Problems with raw-request-param References: <3FC75881.5030909@pb.izm.fhg.de> <3FC7B121.5080400@umn.edu> <3FCB0F64.7010507@pb.izm.fhg.de> <3FCB8793.2000005@umn.edu> In-Reply-To: <3FCB8793.2000005@umn.edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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.