Created
April 24, 2017 16:30
-
-
Save Lukasa/7c4cdba45bd9c142c32fc0a221d78b59 to your computer and use it in GitHub Desktop.
Short read fix.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit ebef3775f0ab40820f5a118b632d5e1f0c7d1121 | |
Author: Cory Benfield <[email protected]> | |
Date: Mon Apr 24 17:23:29 2017 +0100 | |
Read short on EOF | |
diff --git a/urllib3/contrib/securetransport.py b/urllib3/contrib/securetransport.py | |
index 84d213f..cd840a6 100644 | |
--- a/urllib3/contrib/securetransport.py | |
+++ b/urllib3/contrib/securetransport.py | |
@@ -517,6 +517,10 @@ class WrappedSocket(object): | |
return data | |
def recv_into(self, buffer, nbytes=None): | |
+ # Read short on EOF. | |
+ if self._closed: | |
+ return 0 | |
+ | |
if nbytes is None: | |
nbytes = len(buffer) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment