Just tested this in my production environment (apache) and it works as
expected.  I'm having the problem in my dev environment which is
running the built-in rocket server on windows.  It looks like the
Rocket server is not providing request_uri as apache with mod_wsgi
does.

If you just output the contents of request.env in the two different
environments you will see the differences.  According to the WSGI PEP
(http://www.python.org/dev/peps/pep-0333/#environ-variables),
request_uri is not a required environment variable.  I don't think the
'requested_uri' functionality for routes_onerror is mentioned in the
documentation anywhere, but if and when it is a caveat about its
limitations with respect to different web servers should be mentioned.

Unfortunately, I spent several hours trying to figure out what I was
doing wrong before realizing it was not something I had any control
over.  I hope I can save someone else some trouble in the future.

-Mike

On Aug 16, 12:52 pm, mwolfe02 <michael.joseph.wo...@gmail.com> wrote:
> I'm trying to use routes_onerror, but requested_uri keeps coming
> through as None (subject of this e-mail is the query string from the
> redirect).  I searched through the source code and could not find
> where this is supposed to be set.  I stepped through using WinPDB and
> there is simply no entry in request.env for request_uri.  There is an
> entry for path_info which appears to be the re-written uri (ie, post
> routes.py processing).
>
> I'm running from trunk.  Please let me know what other info is needed
> to troubleshoot.
>
> Thanks,
> Mike

Reply via email to