You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_python-commits@quetz.apache.org by gr...@apache.org on 2006/04/13 11:48:20 UTC
svn commit: r393776 - in /httpd/mod_python/branches/3.2.x/test:
htdocs/tests.py test.py
Author: grahamd
Date: Thu Apr 13 02:48:19 2006
New Revision: 393776
URL: http://svn.apache.org/viewcvs?rev=393776&view=rev
Log:
Restructure req_requires test to avoid needing to use AuthBasicAuthoritative
drective just for Apache 2.2 configuration. Change also avoids falling back
onto basic authentication handler, thus avoiding any issues which might have
come from that because of AuthFile directive not being set.
Modified:
httpd/mod_python/branches/3.2.x/test/htdocs/tests.py
httpd/mod_python/branches/3.2.x/test/test.py
Modified: httpd/mod_python/branches/3.2.x/test/htdocs/tests.py
URL: http://svn.apache.org/viewcvs/httpd/mod_python/branches/3.2.x/test/htdocs/tests.py?rev=393776&r1=393775&r2=393776&view=diff
==============================================================================
--- httpd/mod_python/branches/3.2.x/test/htdocs/tests.py (original)
+++ httpd/mod_python/branches/3.2.x/test/htdocs/tests.py Thu Apr 13 02:48:19 2006
@@ -644,13 +644,12 @@
def req_requires(req):
- req.user = "blah" # or else!
-
if req.requires() == ('valid-user',):
req.write("test ok")
return apache.DONE
- return apache.OK
+ req.write("test failed")
+ return apache.DONE
def req_document_root(req):
Modified: httpd/mod_python/branches/3.2.x/test/test.py
URL: http://svn.apache.org/viewcvs/httpd/mod_python/branches/3.2.x/test/test.py?rev=393776&r1=393775&r2=393776&view=diff
==============================================================================
--- httpd/mod_python/branches/3.2.x/test/test.py (original)
+++ httpd/mod_python/branches/3.2.x/test/test.py Thu Apr 13 02:48:19 2006
@@ -639,35 +639,16 @@
def test_req_requires_conf(self):
- if APACHE_VERSION == '2.2':
- # Apache 2.2 needs AuthBasicAuthoritative Off
- # This is necessary when combining mod_auth_basic with third-party
- # modules that are not configured with the AuthBasicProvider
- # directive.
- c = VirtualHost("*",
- ServerName("test_req_requires"),
- DocumentRoot(DOCUMENT_ROOT),
- Directory(DOCUMENT_ROOT,
- SetHandler("mod_python"),
- AuthName("blah"),
- AuthType("basic"),
- Require("valid-user"),
- AuthBasicAuthoritative("Off"),
- PythonAuthenHandler("tests::req_requires"),
- PythonDebug("On")))
-
- else:
- # This configuration is suitable for Apache 2.0
- c = VirtualHost("*",
- ServerName("test_req_requires"),
- DocumentRoot(DOCUMENT_ROOT),
- Directory(DOCUMENT_ROOT,
- SetHandler("mod_python"),
- AuthName("blah"),
- AuthType("basic"),
- Require("valid-user"),
- PythonAuthenHandler("tests::req_requires"),
- PythonDebug("On")))
+ c = VirtualHost("*",
+ ServerName("test_req_requires"),
+ DocumentRoot(DOCUMENT_ROOT),
+ Directory(DOCUMENT_ROOT,
+ SetHandler("mod_python"),
+ AuthName("blah"),
+ AuthType("dummy"),
+ Require("valid-user"),
+ PythonAuthenHandler("tests::req_requires"),
+ PythonDebug("On")))
return str(c)