CGIHTTPServer threading problems



I'm a simple python webserver based on CGIHTTPServer module:

import CGIHTTPServer
import BaseHTTPServer
import SocketServer
import sys
import SQL,network
from config import *

class ThreadingServer(SocketServer.ThreadingMixIn,BaseHTTPServer.HTTPServer):
pass

cfg = params()
print "XBOX Server started on port %s. Press Ctrl+C to kill Server" % cfg.port
server = ThreadingServer((cfg.name,cfg.port),CGIHTTPServer.CGIHTTPRequestHandler)
try:
while 1:
sys.stdout.flush()
server.handle_request()
except KeyboardInterrupt:
print "Server killed"


The my cgi scripts are stored in the cgi-bin folder. One cgi script in particular implements multi-threading and is supposed to be asynchronous but it's not working. The browser that requests on the cgi script tends to wait until the cgi script is done. I checked multi-threaded cgi script but I'm 100% percent sure that it has no problem since it worked as a mod_python script before. Anyone came across with this problem?
.



Relevant Pages

  • Re: IIS Config Help - This is a hard one - Migration from Linux to Win2K
    ... Migrate Apache Settings and Configure IIS in a UNIX-to-Windows ... > I am migrating a website from a Linux server to a Win2k server. ... > to a CGI script. ... > pop-up the binary data in a new browser page. ...
    (microsoft.public.inetserver.iis.security)
  • Re: Ho can I get output of a command in web page?
    ... Do I need to write a cgi script for this, or can a simple SSI be made to work? ... I did think of an automated procedure which was less inclined to error, which was a startup script that wrote the warning about being on the wrong server if it was not the main server. ... I was initially dismissing that as too much work, ... I've not tried the bit to write the data based on the hostname, but the following puts the hostname into an environment variable and prints it. ...
    (uk.net.web.authoring)
  • Re: Concern for storage of payment gateway key
    ... > another server, the passphrase to decrypt the file, and the login access to ... I think your confusion is due to an error in what the CGI script requires. ... The authentication server needs read access to the file ...
    (comp.security.unix)
  • Re: CGIHTTPServer threading problems
    ... print "XBOX Server started on port %s. ... The browser that requests on the cgi script tends ... I checked multi-threaded cgi ...
    (comp.lang.python)
  • Re: Fork / Disconnect question
    ... My variables are sent via an html forum to a cgi script. ... i need to have the multiple processes initiate within the cgi script ... >> Once the spawn process to the server is complete, ... >> I would like to know if i can use fork and disconnect to start the ...
    (comp.lang.tcl)