#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:
shirt-dev 2021-02-11 11:01:34 -05:00 committed by GitHub
parent 5d25607a3a
commit fc2119f210
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: