summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Kaplan-Moss <jacob@jacobian.org>2007-09-15 18:36:31 +0000
committerJacob Kaplan-Moss <jacob@jacobian.org>2007-09-15 18:36:31 +0000
commit40702fe2f0506b2bcf376df1066d6c606314f51a (patch)
treef122c1d39965a0b5c6b34f6b822f73fff34674d8
parent0639474d01cc0457dd1ac43d3dae47d9329dc103 (diff)
Small change to modpython auth handler to support Apache 2.2
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6305 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/contrib/auth/handlers/modpython.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/django/contrib/auth/handlers/modpython.py b/django/contrib/auth/handlers/modpython.py
index c7d921313d..de961fa4dd 100644
--- a/django/contrib/auth/handlers/modpython.py
+++ b/django/contrib/auth/handlers/modpython.py
@@ -10,6 +10,10 @@ def authenhandler(req, **kwargs):
# that so that the following import works
os.environ.update(req.subprocess_env)
+ # apache 2.2 requires a call to req.get_basic_auth_pw() before
+ # req.user and friends are available.
+ req.get_basic_auth_pw()
+
# check for PythonOptions
_str_to_bool = lambda s: s.lower() in ('1', 'true', 'on', 'yes')