A feature-rich command-line audio/video downloader
[downloader/http] Finish downloading once received data length matches expected
Sergey M․f7b42518dc4c
diff --git a/youtube_dl/downloader/http.py b/youtube_dl/downloader/http.pyindex 3c72ea18b2..970103a8dd 100644--- a/youtube_dl/downloader/http.py+++ b/youtube_dl/downloader/http.py@@ -299,7 +299,7 @@ class HttpFD(FileDownloader):'elapsed': now - ctx.start_time,})- if is_test and byte_counter == data_len:+ if data_len is not None and byte_counter == data_len:breakif not is_test and ctx.chunk_size and ctx.data_len is not None and byte_counter < ctx.data_len: