[Medusa-dev] uri % resolving still broken (both release and CVS)

Georg Bauer gb at murphy.bofh.ms
Mon Jun 9 19:26:34 EDT 2003


Hi!

I wrote some time ago about this problem, but up to now the following bug still
exists both in the 0.53 release and the CVS version.

The problem: the URI is passed into medusa. In http_channel in the
found_terminator method, the URI is unquoted to remove % elements. This poses
the problem that %-Elements are used in the query part, too. So if you pass in a
parameter in the query part where you use the % to quote reserved chars like ?
or ; or #, those chars will be unquoted in the http_channel.found_terminator
method. This will lead to wrong request.split_uri handling, as there now are
spurious ? ; or # chars in there.

The unquote should only be done on the path element, not the query, parameter or
fragment. Maybe it can be done to parameter (;-Part) or fragment (#-Part), but
it should never be done to the query (?-Part) before the URI is split apart, as
that leads to the above problem.

It can be solved by not unquoting the full URI, but first do a split_uri on the
URI and only unquote the path and then rejoin those parts to form the original
URI (with unquoted path).

bye, Georg



More information about the Medusa-dev mailing list