summaryrefslogtreecommitdiff
path: root/oauthlib
diff options
context:
space:
mode:
authorCaleb Brown <git@calebbrown.id.au>2012-04-19 12:56:50 +1000
committerCaleb Brown <git@calebbrown.id.au>2012-04-19 12:56:50 +1000
commita3ae77f63b46bed830c171d22137cb5eb4ee9c3e (patch)
treef84ff3d22ae8065ab514c34c0ece210771015f53 /oauthlib
parenteb0858a1627f8d58456020d20c74c75830c67c11 (diff)
downloadoauthlib-a3ae77f63b46bed830c171d22137cb5eb4ee9c3e.tar.gz
Revert "Add support to OAuth1 for including body in the base string based on"
This reverts commit ae386c2154f65054427f33419bf17b6feda563d5. Will be replaced in favour of passing a 'content_type' parameter.
Diffstat (limited to 'oauthlib')
-rw-r--r--oauthlib/oauth1/rfc5849/signature.py22
1 files changed, 9 insertions, 13 deletions
diff --git a/oauthlib/oauth1/rfc5849/signature.py b/oauthlib/oauth1/rfc5849/signature.py
index 3d94f58..2d8fcbd 100644
--- a/oauthlib/oauth1/rfc5849/signature.py
+++ b/oauthlib/oauth1/rfc5849/signature.py
@@ -84,7 +84,6 @@ def collect_parameters(uri_query='', body='', headers=None,
"""
headers = headers or {}
params = []
- content_type = 'application/x-www-form-urlencoded'
if uri_query:
params.extend(urlparse.parse_qsl(uri_query, keep_blank_values=True))
@@ -97,18 +96,15 @@ def collect_parameters(uri_query='', body='', headers=None,
params.extend(utils.parse_authorization_header(
authorization_header))
- content_type = headers_lower.get('content-type', content_type)
-
- if content_type.lower().startswith('application/x-www-form-urlencoded'):
- if isinstance(body, (str, unicode)):
- params.extend(urlparse.parse_qsl(body, keep_blank_values=True))
- elif isinstance(body, dict):
- params.extend(body.items())
- else:
- try:
- params.extend(body)
- except TypeError:
- raise ValueError("Body must be a string, dict, or iterable")
+ if isinstance(body, (str, unicode)):
+ params.extend(urlparse.parse_qsl(body, keep_blank_values=True))
+ elif isinstance(body, dict):
+ params.extend(body.items())
+ else:
+ try:
+ params.extend(body)
+ except TypeError:
+ raise ValueError("Body must be a string, dict, or iterable")
# ensure all paramters are unicode and not escaped
unicode_params = []