[Medusa-dev] RE: [Quixote-users] request.get_url issue [PATCH]

Jason E. Sibre jsibre at sibre.org
Thu Feb 26 20:15:13 EST 2004

> > Unfortunately, our own REQUEST_URI is decoded (at least with medusa it
> > is...)
> It's not if you use Apache.  I don't think it should be decoded.
>   Neil

Ok, again, I agree.  And now I have the patch(es) ready.

These patches fix medusa.http_server, and quixote.server.medusa_http so that
uri unquoting is moved out of medusa and into quixote's handler for medusa
(so that quixote can have the clean URI provided by the client in
REQUEST_URI and can put an unquoted version in PATH_INFO).

I was a little worried about doing this (Other sharp eyes have looked at
this recently), until I saw that the default hander provided with Medusa
(medusa.default_handler.default_handler) actually takes care of it's own URI
unquoting, leading me to believe that this is the correct (or sanctioned)
approach, and that http_server shouldn't be doing it internally.

I especially feel this way since medusa only has one version of that
information available to it internally at that point, and if it unquotes it,
there ain't no goin' back!  Sure, you can requote it, but can you really be
sure you'll end up with the same thing you started with?  Better just to
leave it alone, and unquote a copy of it.

I've tested medusa with it's own default handler against the mythical
"foo%26%3fbar" file, and it works, and of course it's working nicely with


-------------- next part --------------
A non-text attachment was scrubbed...
Name: http_server.unquote_uri.patch
Type: application/octet-stream
Size: 805 bytes
Desc: not available
Url : http://mail.python.org/pipermail/medusa-dev/attachments/20040226/a37bfa67/http_server.unquote_uri.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: medusa_http.unquote_uri.patch
Type: application/octet-stream
Size: 725 bytes
Desc: not available
Url : http://mail.python.org/pipermail/medusa-dev/attachments/20040226/a37bfa67/medusa_http.unquote_uri.obj

More information about the Medusa-dev mailing list