[Python-bugs-list] SimpleHTTPServer hangs browser? (PR#312)

guido@python.org guido@python.org
Thu, 4 May 2000 09:31:32 -0400 (EDT)


I haven't run your example, but my guess is that the SimpleHTTPServer
class only handles one request at a time.  It'c conceivable that the
browser tries to send the request for the applet before it is done
with the main page.

You could try to create a threading or forking subclass of
SimpleHTTPServer, like so:

import SocketServer, SimpleHTTPServer, BaseHTTPServer

class MyServer(SocketServer.ForkingMixIn, BaseHTTPServer.HTTPServer):
    pass

and substitute that for BaseHTTPServer.HTTPServer.

--Guido van Rossum (home page: http://www.python.org/~guido/)