[Web-SIG] urllib.unquote in paste.httpserver prevents slashes in path segments

2011-03-17 Thread Florian Friesdorf
I think paste.httpserver.WSGIHandlerMixin.wsgi_setup should not urllib.unquote the path [1] before setting it in the wsgi environment [2]. The only pre-processing performed on the path between [1] and [2] is concerned with slashes '/'. By urllib.unquoting it is not possible to have urllib.quoted s

Re: [Web-SIG] urllib.unquote in paste.httpserver prevents slashes in path segments

2011-03-17 Thread Ian Bicking
It's implied by WSGI itself that the path be unquoted; there's no fix short of changing the specification. On Thu, Mar 17, 2011 at 1:10 PM, Florian Friesdorf wrote: > > I think paste.httpserver.WSGIHandlerMixin.wsgi_setup should not > urllib.unquote the path [1] before setting it in the wsgi en

Re: [Web-SIG] urllib.unquote in paste.httpserver prevents slashes in path segments

2011-03-17 Thread And Clover
On Thu, 2011-03-17 at 19:10 +0100, Florian Friesdorf wrote: > I think paste.httpserver.WSGIHandlerMixin.wsgi_setup should not > urllib.unquote the path before setting it in the wsgi environment I'm afraid it must. This is something the WSGI specification inherits from CGI. Yes, it was a terrible

Re: [Web-SIG] urllib.unquote in paste.httpserver prevents slashes in path segments

2011-03-17 Thread Ian Bicking
I'll just add that *if* you can design your URL space (you didn't just inherit one), and you want to distinguish path segments from values that contain '/', you can use URLs like: /item/{some/value}/view And then use the matching {}'s to figure out that "some/value" is one path segment. This ma