diff options
author | bashonly <88596187+bashonly@users.noreply.github.com> | 2023-07-20 08:23:30 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-20 13:23:30 +0000 |
commit | 71baa490ebd3655746430f208a9b605d120cd315 (patch) | |
tree | 79f2b2b60ff47405e26474b71ad45d6a04f9ddce /yt_dlp/networking/_urllib.py | |
parent | 613dbce177d34ffc31053e8e01acf4bb107bcd1e (diff) |
[networking] Fix POST requests with zero-length payloads (#7648)
Bugfix for 227bf1a33be7b89cd7d44ad046844c4ccba104f4
Authored by: bashonly
Diffstat (limited to 'yt_dlp/networking/_urllib.py')
-rw-r--r-- | yt_dlp/networking/_urllib.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/yt_dlp/networking/_urllib.py b/yt_dlp/networking/_urllib.py index 2c5f09872..8a76676d9 100644 --- a/yt_dlp/networking/_urllib.py +++ b/yt_dlp/networking/_urllib.py @@ -315,7 +315,7 @@ class HEADRequest(urllib.request.Request): def update_Request(req, url=None, data=None, headers=None, query=None): req_headers = req.headers.copy() req_headers.update(headers or {}) - req_data = data or req.data + req_data = data if data is not None else req.data req_url = update_url_query(url or req.get_full_url(), query) req_get_method = req.get_method() if req_get_method == 'HEAD': |