diff options
| -rw-r--r-- | eventlet/wsgi.py | 3 | ||||
| -rw-r--r-- | tests/wsgi_test.py | 8 |
2 files changed, 3 insertions, 8 deletions
diff --git a/eventlet/wsgi.py b/eventlet/wsgi.py index 7ef0254..3c524cf 100644 --- a/eventlet/wsgi.py +++ b/eventlet/wsgi.py @@ -749,6 +749,9 @@ class HttpProtocol(BaseHTTPServer.BaseHTTPRequestHandler): def finish(self): try: BaseHTTPServer.BaseHTTPRequestHandler.finish(self) + except ssl.SSLZeroReturnError: + # TLS version of connection reset by peer + pass except socket.error as e: # Broken pipe, connection reset by peer if support.get_errno(e) not in BROKEN_SOCK: diff --git a/tests/wsgi_test.py b/tests/wsgi_test.py index 298f694..1c290a9 100644 --- a/tests/wsgi_test.py +++ b/tests/wsgi_test.py @@ -446,9 +446,6 @@ class TestHttpd(_TestBase): start_response('200 OK', {}) return [environ['wsgi.input'].read()] - certificate_file = os.path.join(os.path.dirname(__file__), 'test_server.crt') - private_key_file = os.path.join(os.path.dirname(__file__), 'test_server.key') - server_sock = eventlet.wrap_ssl(eventlet.listen(('localhost', 0)), certfile=certificate_file, keyfile=private_key_file, @@ -469,8 +466,6 @@ class TestHttpd(_TestBase): start_response("200 OK", []) return [b""] - certificate_file = os.path.join(os.path.dirname(__file__), 'test_server.crt') - private_key_file = os.path.join(os.path.dirname(__file__), 'test_server.key') server_sock = eventlet.wrap_ssl(eventlet.listen(('localhost', 0)), certfile=certificate_file, keyfile=private_key_file, @@ -573,9 +568,6 @@ class TestHttpd(_TestBase): start_response('200 OK', []) return [environ['wsgi.input'].read()] - certificate_file = os.path.join(os.path.dirname(__file__), 'test_server.crt') - private_key_file = os.path.join(os.path.dirname(__file__), 'test_server.key') - sock = eventlet.wrap_ssl( eventlet.listen(('localhost', 0)), certfile=certificate_file, keyfile=private_key_file, |
