From cce57b700b8ee507b051354e851a5ef72da5c2c4 Mon Sep 17 00:00:00 2001 From: ed Date: Mon, 24 Oct 2022 03:26:32 +0200 Subject: [PATCH] fix range-request on empty files --- copyparty/httpcli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py index 5e21e0e8..5e317be6 100644 --- a/copyparty/httpcli.py +++ b/copyparty/httpcli.py @@ -2253,7 +2253,7 @@ class HttpCli(object): hrange = self.headers.get("range") # let's not support 206 with compression - if do_send and not is_compressed and hrange: + if do_send and not is_compressed and hrange and file_sz: try: a, b = hrange.split("=", 1)[1].split("-")