I'd like to make sure that the following two urls are handled in the same way (there's an existing client which sends requests this way):
/resource
//resource
Unfortunately I cannot add both urls to the same route and even if I try using the //resource
format, url matching doesn't work correctly with this case.
Is there any way to work around it so that I don't have to rewrite requests in the server in front of WSGI?
edit: I did find pyramid.event which allows me access to the NewRequest event, so I think I can rewrite the path, but with the number of different functions that get the path in various ways, I'm not sure how exactly should I rewrite it in an existing request.
edit2: It seems the whole event doesn't have information about //resource
anymore - no element I query shows it. Everything claims I got a request for just /
.
edit3: It seems to be actually related to paste or some other module in between, rather than Pyramid itself - uwsgi passes the original path_info with double slash without any problems.