"Kamilche" <[EMAIL PROTECTED]> writes: > I was inspired to enhance your code, and perform a critical bug-fix. > Your code would not have sent large files out to dialup users, because > it assumed all data was sent on the 'send' command. I added code to > check for the number of bytes sent, and loop until it's all gone. I > also turned it into a class, and made it 'command' based.
That server seems to do a cpu-busy loop polling the listening socket for incoming requests! Ouch! It also assumes that once it's gotten \r\n in the input, that the entire request has been received. If someone is telnetting into the server typing one character at a time, that could fool it. I think it's better to just launch a separate thread and use BaseHTTPServer which is already in the stdlib. -- http://mail.python.org/mailman/listinfo/python-list