summaryrefslogtreecommitdiff
path: root/oauthlib/common.py
diff options
context:
space:
mode:
authorIdan Gazit <idan@gazit.me>2012-05-01 23:02:47 +0300
committerIdan Gazit <idan@gazit.me>2012-05-01 23:02:47 +0300
commit2cfecffef0e597bae2aaf8ca5deff95def75ddd5 (patch)
tree78dab57fa34f701219059b412c22a8bc9b8ad276 /oauthlib/common.py
parent1aebdfcfe222274a56780969ff5d7edcfded013f (diff)
downloadoauthlib-2cfecffef0e597bae2aaf8ca5deff95def75ddd5.tar.gz
Decode query to unicode in urldecode
For completeness' sake.
Diffstat (limited to 'oauthlib/common.py')
-rw-r--r--oauthlib/common.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/oauthlib/common.py b/oauthlib/common.py
index e08bcb5..4cdfd0d 100644
--- a/oauthlib/common.py
+++ b/oauthlib/common.py
@@ -85,6 +85,7 @@ def urldecode(query):
if len(re.findall(invalid_hex, query)):
raise ValueError('Invalid hex encoding in query string.')
+ query = query.decode('utf-8') if isinstance(query, str) else query
# We want to allow queries such as "c2" whereas urlparse.parse_qsl
# with the strict_parsing flag will not.
params = urlparse.parse_qsl(query, keep_blank_values=True)