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 <1334439445.27.0.556773865165.issue14574@psf.upfronthosting.co.za>
In-reply-to
Content
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 ('127.0.0.1', 50611)
Traceback (most recent call last):
  File "C:\Python27\lib\SocketServer.py", line 284, in _handle_request_noblock
    self.process_request(request, client_address)
  File "C:\Python27\lib\SocketServer.py", line 310, in process_request
    self.finish_request(request, client_address)
  File "C:\Python27\lib\SocketServer.py", line 323, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "C:\Python27\lib\SocketServer.py", line 638, in __init__
    self.handle()
  File "C:\Python27\lib\BaseHTTPServer.py", line 340, in handle
    self.handle_one_request()
  File "C:\Python27\lib\BaseHTTPServer.py", line 329, in handle_one_request
    self.wfile.flush() #actually send the response if not already done.
  File "C:\Python27\lib\socket.py", line 303, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
AttributeError: 'NoneType' object has no attribute 'sendall'
----------------------------------------
History
Date User Action Args
2012-04-14 21:37:25vdjericsetrecipients: + vdjeric, pitrou, kristjan.jonsson, neologix
2012-04-14 21:37:25vdjericsetmessageid: <1334439445.27.0.556773865165.issue14574@psf.upfronthosting.co.za>
2012-04-14 21:37:24vdjericlinkissue14574 messages
2012-04-14 21:37:24vdjericcreate