Skip to content

Commit 06ab210

Browse files
committed
Do not raise ValueError any longer if a GET request has urlencoded body params
1 parent 9e824cf commit 06ab210

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

oauthlib/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
from logging import NullHandler
1313

1414
__author__ = 'The OAuthlib Community'
15-
__version__ = '3.0.2'
15+
__version__ = '3.0.2.post1'
1616

1717
logging.getLogger('oauthlib').addHandler(NullHandler())

oauthlib/oauth1/rfc5849/__init__.py

-9
Original file line numberDiff line numberDiff line change
@@ -297,15 +297,6 @@ def sign(self, uri, http_method='GET', body=None, headers=None, realm=None):
297297
raise ValueError(
298298
'Body signatures may only be used with form-urlencoded content')
299299

300-
# We amend https://tools.ietf.org/html/rfc5849#section-3.4.1.3.1
301-
# with the clause that parameters from body should only be included
302-
# in non GET or HEAD requests. Extracting the request body parameters
303-
# and including them in the signature base string would give semantic
304-
# meaning to the body, which it should not have according to the
305-
# HTTP 1.1 spec.
306-
elif http_method.upper() in ('GET', 'HEAD') and has_params:
307-
raise ValueError('GET/HEAD requests should not include body.')
308-
309300
# generate the basic OAuth parameters
310301
request.oauth_params = self.get_oauth_params(request)
311302

0 commit comments

Comments
 (0)