]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
closes bpo-36755: Suppress noisy error output in test HTTPS server by default. (GH...
authorBenjamin Peterson <benjamin@python.org>
Fri, 17 May 2019 18:29:38 +0000 (11:29 -0700)
committerGitHub <noreply@github.com>
Fri, 17 May 2019 18:29:38 +0000 (11:29 -0700)
commit951af2d7f140be7beb9cda2bcdd54f820c905e45
tree8c4048f8b0db5d4b2996d29209af63bbfef4904d
parentf24a9f3bf42709fb97b954b6dd6f90853967712e
closes bpo-36755: Suppress noisy error output in test HTTPS server by default. (GH-13370)

TLS 1.3 has a more efficient handshake protocol. The client can reject the server's credentials and close the connection before the server has even finished writing out all of its initial data. Depending on whether the server finishes writing the rest of its handshake before the it sees the connection is reset, the server will read an empty line or see a ECONNRESET OSError. Nothing is really wrong here with the server or client, so just suppress the error output in the OSError case to fix the test.

This fix isn't required in Python 3 because clients that reject the server's certificate will shut down the TLS layer before closing the TCP connection.
Lib/test/ssl_servers.py