mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
#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)
This commit is contained in:
parent
5d25607a3a
commit
fc2119f210
1 changed files with 2 additions and 0 deletions
|
@ -2609,6 +2609,8 @@ def http_open(self, req):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def deflate(data):
|
def deflate(data):
|
||||||
|
if not data:
|
||||||
|
return data
|
||||||
try:
|
try:
|
||||||
return zlib.decompress(data, -zlib.MAX_WBITS)
|
return zlib.decompress(data, -zlib.MAX_WBITS)
|
||||||
except zlib.error:
|
except zlib.error:
|
||||||
|
|
Loading…
Reference in a new issue