Skip to content
This repository was archived by the owner on Jun 29, 2019. It is now read-only.

Commit 4aff106

Browse files
committed
Fix an error where the body of a POST request would not be parsed if the Content-Type header contains a charset
1 parent 33bda0a commit 4aff106

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
Bugfixes:
66

7-
- Fix error in `ClientCredentialsGrant` when no expiration of a token is set in the handler ([@wndhydrnt][])
7+
- Fix an error in `ClientCredentialsGrant` when no expiration of a token is set in the handler ([@wndhydrnt][])
8+
- Fix an error where the body of a POST request would not be parsed if the `Content-Type` header contains a `charset` ([@wndhydrnt][])
89

910
## 1.0.0
1011

oauth2/web/wsgi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def __init__(self, env):
3030
self.query_params[param] = value[0]
3131

3232
if (self.method == "POST"
33-
and env["CONTENT_TYPE"] == "application/x-www-form-urlencoded"):
33+
and env["CONTENT_TYPE"].startswith("application/x-www-form-urlencoded")):
3434
self.post_params = {}
3535
content = env['wsgi.input'].read(int(env['CONTENT_LENGTH']))
3636
post_params = parse_qs(content)

0 commit comments

Comments
 (0)