cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "g[R]eK" <>
Subject Re: spaces in request-param
Date Tue, 21 Sep 2004 13:37:03 GMT
<. Hi Éric! .>

Tuesday, September 21, 2004, 2:11:37 PM, you wrote:

BÉ> Greetings

BÉ> I'm trying to solve a problem that I think is a very basic functionality.  I
BÉ> simply cannot believe there are no way to do this, but after 2 days googling
BÉ> aroung,. I still don't find a solution to this.

BÉ> I'm trying to pass request-parameter that contains spaces to a generator ,
BÉ> using this pipeline:

BÉ> <map:pipeline>
BÉ>  <map:match pattern="gazetteer">
BÉ>     <map:generate type="file"
BÉ> src="
BÉ> gi?version=1.0&amp;request=GetPlacenameGeometry&amp;geomtype=bbox&amp;PLACEN
BÉ> AME={raw-request-param:PLACE}"/>

I'm not sure why raw-request-param is used. To avoid decoding and casting? I
think it's not good practice. Try to use url-encode[1] and request-param

It works for me very well.


BÉ> and somewhere down this impressive list I see

BÉ> Caused by: Server returned HTTP response code: 400 for
BÉ> rsion=1.0&request=GetPlacenameGeometry&geomtype=bbox&PLACENAME=Black River
BÉ> 	at

RFC[2] says:
400 Bad Request

The request could not be understood by the server due to malformed syntax.

I think it's error due to not escapted spaces or other characters.

BÉ> Of course, if I copy this URL
BÉ> (
BÉ> ersion=1.0&request=GetPlacenameGeometry&geomtype=bbox&PLACENAME=Black
BÉ> River)and copy it in a browser, it works fine

AFAIK Browsers escape charactacters automatically.

BÉ> Any clue ?  Sorry if I missed something obvious but I search and did not
BÉ> find anything.  I can't believe I'm the only one passing parameters with
BÉ> spaces in the whole cocoon community ! 

Hope this help.

[1] http://localhost:8080/cocoon/api/java/org/apache/cocoon/components/modules/input/URLEncodeModule.html
    (I give you local link because javadocs on cocoon's site seem to be outdate)

Best regards
<. g[R]eK                                    .>

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message