@@ -353,6 +353,7 @@ def __init__(self, method=HTTP_METHOD, url=None, parameters=None,
353
353
for k , v in parameters .items ():
354
354
k = to_unicode (k )
355
355
v = to_unicode_optional_iterator (v )
356
+
356
357
self [k ] = v
357
358
self .body = body
358
359
self .is_form_encoded = is_form_encoded
@@ -540,6 +541,7 @@ def from_request(cls, http_method, http_url, headers=None, parameters=None,
540
541
# GET or POST query string.
541
542
if query_string :
542
543
query_params = cls ._split_url_string (query_string )
544
+
543
545
parameters .update (query_params )
544
546
545
547
# URL parameters.
@@ -757,6 +759,8 @@ def _check_signature(self, request, consumer, token):
757
759
signature = request .get ('oauth_signature' )
758
760
if signature is None :
759
761
raise MissingSignature ('Missing oauth_signature.' )
762
+ if isinstance (signature , str ):
763
+ signature = signature .encode ('ascii' , 'ignore' )
760
764
761
765
# Validate the signature.
762
766
valid = signature_method .check (request , consumer , token , signature )
0 commit comments