t.web's Request.prePathURL does not rebuild the URL correctly
|Reported by:||emgee||Owned by:|
branch-diff, diff-cov, branch-cov, buildbot
Quick summary is that the way Request unquotes and quotes the bits of the URL is not symmetrical. This shows up when a path segment contains a '/' for example.
Request.postpath is a list of decoded, i.e. real, path segments:
self.postpath = map(unquote, string.split(self.path[1:], '/'))
Items in Request.prepath are moved to Request.prepath as child resource are located, making prepath also a list of decoded path segments.
However, Request._prePathURL does not re-quote the individual prepath items. Instead it seems to rely on urllib.quote working (which it doesn't) for the whole URL string.
A fix can probably be taken from Nevow's flattener code. It uses the following to encode each path segment, query parameter name, query parameter value and fragment:
Change History (6)
comment:1 Changed 9 years ago by
|Owner:||changed from jknight to Jean-Paul Calderone|
|Status:||new → assigned|
comment:3 Changed 9 years ago by
|Owner:||Jean-Paul Calderone deleted|
|Status:||assigned → new|
comment:4 Changed 9 years ago by
|Owner:||set to Jean-Paul Calderone|
|Priority:||normal → highest|