Ian Bicking wrote: > > On Sat, 2002-05-18 at 11:25, Geoffrey Talvola wrote: > > - I modified it to use a ThreadedHTTPServer class I found in an old > > comp.lang.python post. So now it actually handles requests on separate > > threads, so it will support concurrent requests. >
Don't know if you ran across this thread, which answers a similar issue with: : Fred> Off to a bad start, I made the following simple-minded change : : Fred> in class BaseHTTPRequestHandler(SocketServer.StreamRequestHandler) : : : : Fred> in def handle(self) : : : Fred> the last line : method() # generally self.do_GET() : Fred> becomes : thread.start_new_thread(method, () ) : :I think you can just create a suitable subclass of SocketServer.TCPServer. :In my XML-RPC server, I did: : : class GenericServer(SocketServer.ThreadingMixIn, SocketServer.TCPServer): : """generic XML-RPC server class""" : ... : :Each request to my server is handled in a separate thread. http://groups.google.com/groups?hl=en&lr=&selm=mailman.999271788.3859.python-list%40python.org I didn't look at your code, just doing a knee-jerk reaction. > I suppose this should get rid of the problem of blocking requests that > someone mentioned on the discuss list. > > > - I also removed support for POST requests without a content-length header. > > Okay... I'm realizing that input should actually be read for any method, > if a content-length exists. PUT is the the other traditional method, > but many DAV methods take content -- HTTPAdapter doesn't need to > understand DAV, it just needs to know to read data when content-length > is present. I guess just taking out the line "if self.requestMethod == > 'POST':" would be enough. > > Ian > > _______________________________________________________________ > Hundreds of nodes, one monster rendering program. > Now that's a super model! Visit http://clustering.foundries.sf.net/ > > _______________________________________________ > Webware-discuss mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/webware-discuss -- Bill Eldridge Radio Free Asia [EMAIL PROTECTED] _______________________________________________________________ Hundreds of nodes, one monster rendering program. Now that's a super model! Visit http://clustering.foundries.sf.net/ _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
