Multithreading support for *win32* BaseHTTPServer

Gerson Kurz gerson.kurz at t-online.de
Wed Aug 29 07:03:39 CEST 2001


On Tue, 28 Aug 2001 08:03:53 -0400 (EDT), "Scherer, Bill"
<Bill.Scherer at VerizonWireless.com> wrote:

>
>Try the following:
> [Source Snipped]

Neither your example nor the ones posted by the other folks seems to
work on Win32 (more specifically: ActivePython 2.1.0.210, Windows 2000
SP2) I get this for your example:

D:\Python21\Lib>testmtserver.py
serving on port 9999
Exception in thread Thread-1:
Traceback (most recent call last):
  File "D:\Python21\Lib\threading.py", line 378, in __bootstrap
    self.run()
  File "D:\Python21\Lib\threading.py", line 366, in run
    apply(self.__target, self.__args, self.__kwargs)
  File "D:\Python21\Lib\SocketServer.py", line 246, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "D:\Python21\Lib\SocketServer.py", line 495, in __init__
    self.handle()
  File "D:\Python21\Lib\BaseHTTPServer.py", line 258, in handle
    self.raw_requestline = self.rfile.readline()
  File "D:\Python21\Lib\socket.py", line 233, in readline
    new = self._sock.recv(self._rbufsize)
AttributeError: 'int' object has no attribute 'recv'

and a similar error message for the other two examples :( 




More information about the Python-list mailing list