diff options
author | shirt-dev <2660574+shirt-dev@users.noreply.github.com> | 2021-02-11 11:01:34 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-11 21:31:34 +0530 |
commit | fc2119f21057b56a67fa9bcfcad37f8444a4dcd5 (patch) | |
tree | e2f3f6132dfceb9c5310b18dd6c8a2fd054d4bcc | |
parent | 5d25607a3a9fb1c1e0f56b40cffc825847e1cd6d (diff) | |
download | hypervideo-pre-fc2119f21057b56a67fa9bcfcad37f8444a4dcd5.tar.lz hypervideo-pre-fc2119f21057b56a67fa9bcfcad37f8444a4dcd5.tar.xz hypervideo-pre-fc2119f21057b56a67fa9bcfcad37f8444a4dcd5.zip |
#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)
-rw-r--r-- | youtube_dlc/utils.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/youtube_dlc/utils.py b/youtube_dlc/utils.py index f4ee52afb..8f051cd1b 100644 --- a/youtube_dlc/utils.py +++ b/youtube_dlc/utils.py @@ -2609,6 +2609,8 @@ class YoutubeDLHandler(compat_urllib_request.HTTPHandler): @staticmethod def deflate(data): + if not data: + return data try: return zlib.decompress(data, -zlib.MAX_WBITS) except zlib.error: |