calcurse-caldav: Encode the request body in UTF-8
When a string is passed to HTTPConnection.request(), it is automatically ISO 8859-1 encoded. Therefore, since we already specify UTF-8 as character set in the headers, we need to UTF-8 encode the request body manually. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
parent
5d793f6b35
commit
b6f95b380f
@ -108,6 +108,9 @@ def remote_query(conn, cmd, path, additional_headers, body):
|
||||
print("> " + line)
|
||||
print()
|
||||
|
||||
if isinstance(body, str):
|
||||
body = body.encode('utf-8')
|
||||
|
||||
conn.request(cmd, path, headers=headers, body=body)
|
||||
|
||||
resp = conn.getresponse()
|
||||
|
Loading…
x
Reference in New Issue
Block a user