Multiple (threaded?) connections to BaseHTTPServer

Robert Brewer fumanchu at amor.org
Tue Aug 23 20:54:00 EDT 2005


Adam Atlas wrote:
> Is there any built-in way for BaseHTTPServer to handle multiple
> connections at once, e.g. with threads? If not, can this existing
> module be easily extended to do this, or will I have to do lower-level
> socket things (and probably thus have to write my own HTTP code)?

Do you *really* want to reinvent that wheel? ;) I'd suggest you start
with a threaded HTTP server from one of Python's many web frameworks.
Since I hack on CherryPy, I'll link you to its liberally-licensed
PooledThreadServer:

http://www.cherrypy.org/file/trunk/cherrypy/_cphttpserver.py


Robert Brewer
System Architect
Amor Ministries
fumanchu at amor.org



More information about the Python-list mailing list