New submission from Jonathan Kamens: 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 ---------- components: Library (Lib) messages: 244134 nosy: Jonathan Kamens priority: normal severity: normal status: open title: wsgiref.simple_server.WSGIRequestHandler doesn't log request timeouts type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24292> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com