diff --git a/test/test_http.py b/test/test_http.py index d684905da5..3941a6e776 100644 --- a/test/test_http.py +++ b/test/test_http.py @@ -17,9 +17,11 @@ import threading import urllib.error import urllib.request +import zlib from test.helper import http_server_port from yt_dlp import YoutubeDL +from yt_dlp.dependencies import brotli from yt_dlp.utils import sanitized_Request, urlencode_postdata from .helper import FakeYDL @@ -148,6 +150,31 @@ def do_GET(self): self.send_header('Location', new_url) self.send_header('Content-Length', '0') self.end_headers() + elif self.path == '/content-encoding': + encodings = self.headers.get('ytdl-encoding', '') + payload = b'