From 181397713308c5c6c514091605ba3086dc548986 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Sat, 27 Jul 2024 13:40:12 +0200 Subject: [PATCH] Encode requests POST as UTF-8 if it has no encoding/basic string #1315 #2309 --- changedetectionio/content_fetchers/requests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changedetectionio/content_fetchers/requests.py b/changedetectionio/content_fetchers/requests.py index 5e984c5e..2e952c9c 100644 --- a/changedetectionio/content_fetchers/requests.py +++ b/changedetectionio/content_fetchers/requests.py @@ -53,7 +53,7 @@ class fetcher(Fetcher): session.mount('file://', FileAdapter()) r = session.request(method=request_method, - data=request_body, + data=request_body.encode('utf-8') if type(request_body) is str else request_body, url=url, headers=request_headers, timeout=timeout,