|
Jack Moffitt
jack at icecast.org
Fri Aug 4 23:19:58 EST 2000
Using the tutorial, i got the first example to work.
Then i did the second example, and that is not authenticating me. I
figured I've got a typo somewhere so i modified it to look like:
def authenhandler(req):
user = req.connection.user
pw = req.get_basic_auth_pw()
if user == "spam" and pw == "eggs":
return apache.OK
else:
apache.log_error('start', apache.APLOG_NOTICE)
apache.log_error(user, apache.APLOG_NOTICE)
apache.log_error(pw, apache.APLOG_NOTICE)
apache.log_error('end', apache.APLOG_NOTICE)
return apache.HTTP_UNAUTHORIZED
when I make the request, i get (from error_log):
[Fri Aug 4 23:07:57 2000] [notice] (13)Permission denied: start
[Fri Aug 4 23:07:57 2000] [notice] (13)Permission denied: eggs
[Fri Aug 4 23:07:57 2000] [notice] (13)Permission denied: end
the user var must be blank, because it never makes it.
access_log has:
127.0.0.1 - spam [04/Aug/2000:23:07:57 -0700] "GET /test/test.py HTTP/1.0" 401 471
which has the username correct.
Where am I going wrong here? Or is this a bug?
jack.
|