I'm having a problem with url_for generated URLs. Given the following
route:
map.connect('test', 'test/:filename', controller='mytest',
action='urltest')
url_for('test', filename='a filename with spaces.txt') generates:
/test/a+filename+with+spaces.txt
I have a file 'public/test/a filename with spaces.jpg', but Pylons
does not find it. Instead, it runs urltest in the mytest controller
with a filename of 'a filename with spaces.txt' (the correct
filename).
When I force the plus signs to %20, Pylons serves the static file as
expected, but I'm not sure if this problem is in Routes, or the URL
parser used for static pages, or my browser (Safari on a Mac), or
something else.
How can I fix this?