Skip to content

[2.7] closes bpo-36755: Suppress noisy error output in test HTTPS server. #13370

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 17, 2019
Merged

[2.7] closes bpo-36755: Suppress noisy error output in test HTTPS server. #13370

merged 1 commit into from
May 17, 2019

Conversation

benjaminp
Copy link
Contributor

@benjaminp benjaminp commented May 16, 2019

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.

https://bugs.python.org/issue36755

… default.

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.
@benjaminp benjaminp changed the title closes bpo-36755: Suppress noisy error output in test HTTPS server. [2.7] closes bpo-36755: Suppress noisy error output in test HTTPS server. May 16, 2019
@matrixise matrixise requested a review from tiran May 17, 2019 11:43
Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Even if I'm not 100% confident that the change is correct, since it only impacts tests, I'm fine with it :-)

@benjaminp benjaminp merged commit 951af2d into python:2.7 May 17, 2019
@benjaminp benjaminp deleted the ssl-noise branch May 17, 2019 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants