You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A common workaround for unicode and slashes encoded in the URL
is to have the wsgi app server pass REQUEST_URI and then deal
with it in middleware. It would be nice to
be able to test said middleware.
For now, a workaround is to wrap TestApp.get and always specify
extra_environ={'REQUEST_URI':url}.
Ian Bicking:
This may be hard to implement correctly, as the request construction
deconstructs the URL, and that's happening in WebOb. I don't think
the change would be appropriate for WebOb itself. Also quite a lot
of WSGI servers at this point don't set REQUEST_URI, so always
having it on doesn't seem like a good idea (having it off is more
representative of lowest-common-denominator WSGI servers).
An option to turn it on seems okay though (something you can pass
in when instantiating TestApp).
It turned out, that REQUEST_URI is not even in the WSGI spec and WSGI
servers might not provide it in request environ.
WebTest does not provide REQUEST_URI, that why I had to add it by
extending webtest.TestApp.
Pylons/webtest#1
Anonymous:
Ian Bicking:
URL: https://bitbucket.org/ianb/webtest/issue/8/testappget-should-pass-request_uri
The text was updated successfully, but these errors were encountered: