diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2023-07-30 03:18:10 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2023-07-30 03:18:10 +0530 |
commit | 3f7965105d8d2048359e67c1e8b8ebd51588143b (patch) | |
tree | 1dc8361296dff4ab2218367487c887c55c9b32e5 /yt_dlp/utils/networking.py | |
parent | de20687ee6b742646128a7629b57096631a20619 (diff) | |
download | hypervideo-pre-3f7965105d8d2048359e67c1e8b8ebd51588143b.tar.lz hypervideo-pre-3f7965105d8d2048359e67c1e8b8ebd51588143b.tar.xz hypervideo-pre-3f7965105d8d2048359e67c1e8b8ebd51588143b.zip |
[utils] HTTPHeaderDict: Handle byte values
Diffstat (limited to 'yt_dlp/utils/networking.py')
-rw-r--r-- | yt_dlp/utils/networking.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/yt_dlp/utils/networking.py b/yt_dlp/utils/networking.py index bbcea84d2..ba0493cc2 100644 --- a/yt_dlp/utils/networking.py +++ b/yt_dlp/utils/networking.py @@ -65,6 +65,8 @@ class HTTPHeaderDict(collections.UserDict, dict): self.update(kwargs) def __setitem__(self, key, value): + if isinstance(value, bytes): + value = value.decode('latin-1') super().__setitem__(key.title(), str(value)) def __getitem__(self, key): |