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.
Created on 2015年05月26日 20:28 by Jonathan Kamens, last changed 2022年04月11日 14:58 by admin.
| Messages (1) | |||
|---|---|---|---|
| msg244134 - (view) | Author: Jonathan Kamens (Jonathan Kamens) | Date: 2015年05月26日 20:28 | |
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 |
| 2022年04月11日 14:58:17 | admin | set | github: 68480 |
| 2015年05月27日 00:43:35 | berker.peksag | set | nosy:
+ berker.peksag |
| 2015年05月26日 20:52:31 | ned.deily | set | nosy:
+ pje versions: + Python 3.6, - Python 3.2, Python 3.3 |
| 2015年05月26日 20:28:40 | Jonathan Kamens | create | |