This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Jonathan Kamens
Recipients Jonathan Kamens
Date 2015-05-26.20:28:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1432672120.91.0.975009053361.issue24292@psf.upfronthosting.co.za>
In-reply-to
Content
http.BaseHTTPRequestHandler logs request timeouts. In handle_one_request():

        except socket.timeout as e:
            #a read or a write timed out.  Discard this connection
            self.log_error("Request timed out: %r", e)
            self.close_connection = 1
            return

Unfortunately, wsgiref.simple_server.WSGIRequestHandler, which overrides BaseHTTPRequestHandler's handle() method, does _not_ catch and log request timeouts. Fixing this is a simple matter of wrapping the entire body of its handle() function in a try with this except clause:

except socket.timeout as e:
    self.log_error("Request timed out: %r", e)
    raise
History
Date User Action Args
2015-05-26 20:28:40Jonathan Kamenssetrecipients: + Jonathan Kamens
2015-05-26 20:28:40Jonathan Kamenssetmessageid: <1432672120.91.0.975009053361.issue24292@psf.upfronthosting.co.za>
2015-05-26 20:28:40Jonathan Kamenslinkissue24292 messages
2015-05-26 20:28:40Jonathan Kamenscreate