Mercurial > hg
diff tests/test-http.t @ 36877:02bea04b4c54
hgweb: transition permissions hooks to modern request type (API)
We're trying to remove ``wsgirequest``. The permissions hooks don't
do anything they can't do with our new request type. So let's
pass that in.
This was the last use of ``wsgirequest`` in the wire protocol code!
.. api::
hgweb.hgweb_mod.permhooks no longer take a ``wsgirequest`` instance
as an argument.
Differential Revision: https://phab.mercurial-scm.org/D2793
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 10 Mar 2018 18:19:27 -0800 |
parents | e3c228b4510d |
children | 4901d1e22b27 |
line wrap: on
line diff
--- a/tests/test-http.t Sat Mar 10 20:16:20 2018 -0800 +++ b/tests/test-http.t Sat Mar 10 18:19:27 2018 -0800 @@ -168,7 +168,7 @@ > import base64 > from mercurial.hgweb import common > def perform_authentication(hgweb, req, op): - > auth = req.env.get('HTTP_AUTHORIZATION') + > auth = req.headers.get('Authorization') > if not auth: > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, 'who', > [('WWW-Authenticate', 'Basic Realm="mercurial"')]) @@ -510,7 +510,7 @@ > from mercurial import util > from mercurial.hgweb import common > def perform_authentication(hgweb, req, op): - > cookie = req.env.get('HTTP_COOKIE') + > cookie = req.headers.get('Cookie') > if not cookie: > raise common.ErrorResponse(common.HTTP_SERVER_ERROR, 'no-cookie') > raise common.ErrorResponse(common.HTTP_SERVER_ERROR, 'Cookie: %s' % cookie)