As I already said, I am switching to Quixote from a server based on
BaseHTTPServer and CGIHTTPServer. Quixote does not have its own HTTP server
but it can be used with Medusa or Twisted. First thing I am trying is
Medusa. I have not looked at Twisted yet, may be I'll do it today or
tomorrow.
I need a small self-contained HTTP server to run a number of small CGIs.
The server must be easily deployed on all platforms, including ones from
Redmond, so all-python solution is prefereable. Medusa+Quixote looks like a
very good solution.
There are, though, a number of issues, mostly Medusa-related.
First problem is that quixote.server.medusa_http does not pass all HTTP
header. I need Authorization header to implement Basic Auth authorization
scheme. Attached is a patch... just a few lines copied from
twisted_http.py.
Second problem. For one of my CGI I need to constantly update user
screen. With BaseHTTPServer it was rather simple - just do
self.wfile.write. How could I (if I could it at all) to write to a browser
while processing a request?
How could I say to user "good by" and stop my program? I want to do
something like that:
def quit(request):
publisher.session_mgr.expire_session(request)
signal_asyncore_to_process_the_last_request_and_stop()
return "Thank you! Goodby!"
But what is signal_asyncore_to_process_the_last_request_and_stop? I
cannot do asyncore.close_all() because it will close all sockets too early.
Oleg.
--
Oleg Broytmann http://phd.pp.ru/ phd@phd.pp.ru
Programmers don't die, they just GOSUB without RETURN.