]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Add comment explaining workaround 2970/head
authorbfis <b.fis@cern.ch>
Mon, 11 Jan 2021 16:49:33 +0000 (17:49 +0100)
committerGitHub <noreply@github.com>
Mon, 11 Jan 2021 16:49:33 +0000 (17:49 +0100)
tornado/iostream.py

index 51a348c2c7aa30edca556b8670580d3aaf343c6e..7610bce4fa0acc1c21357570aa70902db52cb36c 100644 (file)
@@ -1587,6 +1587,9 @@ class SSLIOStream(IOStream):
                 # to read (attempting to read may or may not raise an exception
                 # depending on the SSL version)
                 return None
+            # clip buffer size at 1GB since SSL sockets only support upto 2GB
+            # this change in behaviour is transparent, since the function is
+            # already expected to (possibly) read less than the provided buffer
             if len(buf) >> 30:
                 buf = memoryview(buf)[: 1 << 30]
             try: