From fc2119f21057b56a67fa9bcfcad37f8444a4dcd5 Mon Sep 17 00:00:00 2001 From: shirt-dev <2660574+shirt-dev@users.noreply.github.com> Date: Thu, 11 Feb 2021 11:01:34 -0500 Subject: [PATCH] #76 Fix for empty HTTP head requests Related: https://github.com/ytdl-org/youtube-dl/issues/7181 Authored-by: shirtjs <2660574+shirtjs@users.noreply.github.com> (shirt-dev) --- youtube_dlc/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/youtube_dlc/utils.py b/youtube_dlc/utils.py index f4ee52afbf..8f051cd1b2 100644 --- a/youtube_dlc/utils.py +++ b/youtube_dlc/utils.py @@ -2609,6 +2609,8 @@ def http_open(self, req): @staticmethod def deflate(data): + if not data: + return data try: return zlib.decompress(data, -zlib.MAX_WBITS) except zlib.error: