2004-05-29 | paulb | raw annotate files changeset graph | [project @ 2004-05-29 17:25:44 by paulb] Added a set_user method which is used to override the user identity provided in the request sent in to WebStack. This is useful for providing alternative authentication systems which act like the standard HTTP mechanisms. |
1 #!/usr/bin/env python 2 3 from WebStack.Adapters import BaseHTTPRequestHandler 4 from Simple import SimpleResource 5 import BaseHTTPServer 6 7 # Special magic incantation. 8 9 handler = BaseHTTPRequestHandler.HandlerFactory(SimpleResource()) 10 address = ("", 8080) 11 server = BaseHTTPServer.HTTPServer(address, handler) 12 server.serve_forever() 13 14 # vim: tabstop=4 expandtab shiftwidth=4