[utils] Don't use Content-length with encoding (#6176)
Authored by: felixonmars Closes #3772, #6178
This commit is contained in:
parent
a9189510ba
commit
65e5c021e7
2 changed files with 6 additions and 4 deletions
|
|
@ -211,7 +211,12 @@ class HttpFD(FileDownloader):
|
|||
ctx.stream = None
|
||||
|
||||
def download():
|
||||
data_len = ctx.data.info().get('Content-length', None)
|
||||
data_len = ctx.data.info().get('Content-length')
|
||||
|
||||
if ctx.data.info().get('Content-encoding'):
|
||||
# Content-encoding is present, Content-length is not reliable anymore as we are
|
||||
# doing auto decompression. (See: https://github.com/yt-dlp/yt-dlp/pull/6176)
|
||||
data_len = None
|
||||
|
||||
# Range HTTP header may be ignored/unsupported by a webserver
|
||||
# (e.g. extractor/scivee.py, extractor/bambuser.py).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue