Skip to content

Commit eb37124

Browse files
authored
Merge pull request #778 from shc261392/fix-httpx-oauth1-form-data-incorrect-signature
2 parents 0ba9ec4 + cf4038e commit eb37124

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

authlib/oauth1/rfc5849/client_auth.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ def prepare(self, method, uri, headers, body):
172172

173173
if CONTENT_TYPE_FORM_URLENCODED in content_type:
174174
headers["Content-Type"] = CONTENT_TYPE_FORM_URLENCODED
175+
if isinstance(body, bytes):
176+
body = body.decode()
175177
uri, headers, body = self.sign(method, uri, headers, body)
176178
elif self.force_include_body:
177179
# To allow custom clients to work on non form encoded bodies.

0 commit comments

Comments
 (0)