Skip to content

Commit 4d919b8

Browse files
authored
Do not try to stringify http message assuming it will be ascii (#2365)
1 parent 8ddbf0a commit 4d919b8

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

changes/2365.bugfix.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix error when attempting to stringify http request with a non-ascii character

hikari/impl/rest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ def _stringify_http_message(headers: data_binding.Headers, body: bytes | None) -
482482

483483
if body:
484484
string += "\n\n "
485-
string += body.decode("ascii")
485+
string += body.decode()
486486

487487
return string
488488

0 commit comments

Comments
 (0)