On Thu, Feb 21, 2013 at 05:11:28AM -0800, Simon King wrote:
> Hi all,
> 
> I'm not sure if this would be considered a bug, but I'm having trouble 
> generating URLs using request.route_url, when my replacement values 
> themselves contain slashes. For example, if I had the following route 
> defined:
> 
>   config.add_route('test', '/tests/{testname}/')
> 
> and I generate a route like this:
> 
>   request.route_url('test', testname='one/two')
> 
> ...the resulting URL will look something like:
> 
>   http://localhost/tests/one%2Ftwo/
> 
> However, if I try to visit this URL, it is treated exactly the same as:
> 
>   http://localhost/tests/one/two/

AFAIKR this is because the WSGI spec requires an unquoted path so the
information is lost before pyramid gets it. It comes up on web-sig every
now and then, here's one of the times it was talked about:

    http://mail.python.org/pipermail/web-sig/2011-March/005007.html

So it is a bug, but in WSGI, rather than in pyramid.

-- 
Brian Sutherland

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to