Author vdjeric
Recipients kristjan.jonsson, neologix, pitrou, vdjeric
Date 2012-04-14.21:37:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Thank you for taking a look Charles-Fran├žois.

I should note that catching the first exception in the request handler and then calling self.wfile.close() wouldn't fully solve the issue. The self.wfile.close() call would throw another broken pipe exception (which is ok & can be caught), but the BaseHTTPServer code would also throw an exception when it tries to flush the (now closed) wfile after returing from the do_POST request handler.

Exception happened during processing of request from ('', 50611)
Traceback (most recent call last):
  File "C:\Python27\lib\", line 284, in _handle_request_noblock
    self.process_request(request, client_address)
  File "C:\Python27\lib\", line 310, in process_request
    self.finish_request(request, client_address)
  File "C:\Python27\lib\", line 323, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "C:\Python27\lib\", line 638, in __init__
  File "C:\Python27\lib\", line 340, in handle
  File "C:\Python27\lib\", line 329, in handle_one_request
    self.wfile.flush() #actually send the response if not already done.
  File "C:\Python27\lib\", line 303, in flush
AttributeError: 'NoneType' object has no attribute 'sendall'
Date User Action Args
2012-04-14 21:37:25vdjericsetrecipients: + vdjeric, pitrou, kristjan.jonsson, neologix
2012-04-14 21:37:25vdjericsetmessageid: <>
2012-04-14 21:37:24vdjericlinkissue14574 messages
2012-04-14 21:37:24vdjericcreate