-
Notifications
You must be signed in to change notification settings - Fork 331
Set suppress_ragged_eofs default based on SSLSocket defaults #695
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
Conversation
To construct test code, please describe HTTP interaction in more detail. Eventlet is on client side? Who sends |
eventlet==0.30.2 Unfortunately I cannot share the URL:
Eventlet is being used to patch requests so that it is non-blocking. I use non-blocking requests to make API calls from a server that is running on eventlet. When the remote server closes the monkey patched requests SSL connection in Python 3.6, everything operates as expected and the request returns content as normal. When the request is sent in Python 3.7+, the request is terminated and raises an SSLError when the connection is closed because suppress_ragged_eofs is None in GreenSSLSocket instead of True like it is in SSLSocket. Monkey patching ssl is causing this error because GreenSSLSocket has the incorrect default value for suppress_ragged_eofs in Python 3.7+. |
Codecov Report
@@ Coverage Diff @@
## master #695 +/- ##
======================================
- Coverage 44% 44% -1%
======================================
Files 87 87
Lines 11920 11920
Branches 1780 1780
======================================
- Hits 5289 5288 -1
- Misses 6227 6228 +1
Partials 404 404
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
I failed to write a test that would fail with current code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@temoto |
@reese-allison here I waited for other reviewers. If you want to accelerate merge of something in particular, write ping there. |
I have an HTTPS connection that required Connection: close to be sent in the header and it was closing as soon as the data was sent. I cannot post the server URL, but it was raising the below error:
This is a result of
suppress_ragged_eofs
defaulting to True inSSLSocket
, but defaulting to None inGreenSSLSocket
when monkey_patched. This only occurs in Python 3.7+.