From b6dba8beeecd5aa0f11c5536d4085a96ab7affb7 Mon Sep 17 00:00:00 2001 From: ed Date: Thu, 11 Feb 2021 22:50:59 +0000 Subject: [PATCH] imagine going plaintext in the middle of a tls reply --- copyparty/httpcli.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py index 258e8e26..a92fdfee 100644 --- a/copyparty/httpcli.py +++ b/copyparty/httpcli.py @@ -937,8 +937,11 @@ class HttpCli(object): open_func = open # 512 kB is optimal for huge files, use 64k open_args = [fsenc(fs_path), "rb", 64 * 1024] - if hasattr(os, "sendfile"): - use_sendfile = not self.args.no_sendfile + use_sendfile = ( + not self.ssl_suf + and not self.args.no_sendfile + and hasattr(os, "sendfile") + ) # # send reply