I've been playing with some of the code from Andrew's Jan-04 thread on
"Adding support for authentication"
http://mail.mems-exchange.org/pipermail/quixote-users/2004-January/002462.html
and to get basic authentication working with medusa_http.py, I had to
add a line to the environ dict:
---
/usr/lib/python2.3/site-packages/quixote/server/medusa_http_py.orig
2004-08-06 23:57:08.000000000 -0400
+++ /usr/lib/python2.3/site-packages/quixote/server/medusa_http.py
2004-08-06 23:35:28.000000000 -0400
@@ -64,6 +64,7 @@
'SERVER_PORT':str(self.server.port),
'SERVER_PROTOCOL':'HTTP/1.1',
'SERVER_SOFTWARE':self.server_name,
+ 'HTTP_AUTHORIZATION':msg.get('Authorization',None),
}
for k,v in environ.items():
if v == None:
I may have missed something, but that was the only way I could get an
authorization header to compare to. Once I clean things up a tad, I'll
pass on my utility code (which is basically Andrew's implementation,
toyed with a bit). It's interesting, and neat to be able to not have
to use cookies. Basic authentication is one step from plaintext, of
course...but login forms aren't much better. *grin* Getting digest
authentication working would be excellent! RFC2617 is glazing my eyes
over as I type this...great job outlining the issues, Andrew! Thanks
for the code.
--
Ken Kennedy | http://www.kenzoid.com | kkennedy@kenzoid.com