diff options
author | Jonathan Huot <JonathanHuot@users.noreply.github.com> | 2018-08-20 23:57:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-20 23:57:51 +0200 |
commit | 153b72680f0044d694eb23bbd2c62b8c19ee5543 (patch) | |
tree | 367128761a0e8a8851d8d5b0c7d37ffbf60a16c8 | |
parent | 0ac839f5435c267fe3643a6c7754bab4d0231cfd (diff) | |
parent | 8cb3d7210132d7c94672a86468c3df3b6ef12c6a (diff) | |
download | oauthlib-153b72680f0044d694eb23bbd2c62b8c19ee5543.tar.gz |
Merge branch 'master' into 445_confirm_redirect
-rw-r--r-- | README.rst | 8 | ||||
-rw-r--r-- | oauthlib/common.py | 1 | ||||
-rw-r--r-- | tests/test_common.py | 5 |
3 files changed, 9 insertions, 5 deletions
@@ -1,5 +1,5 @@ -OAuthLib -======== +OAuthLib - Python Framework for OAuth1 & OAuth2 +=============================================== *A generic, spec-compliant, thorough implementation of the OAuth request-signing logic for Python 2.7 and 3.4+.* @@ -34,7 +34,7 @@ both of the following: .. _`OAuth 1.0 spec`: https://tools.ietf.org/html/rfc5849 .. _`OAuth 2.0 spec`: https://tools.ietf.org/html/rfc6749 -OAuthLib is a generic utility which implements the logic of OAuth without +OAuthLib is a framework which implements the logic of OAuth1 or OAuth2 without assuming a specific HTTP request object or web framework. Use it to graft OAuth client support onto your favorite HTTP library, or provide support onto your favourite web framework. If you're a maintainer of such a library, write a thin @@ -119,7 +119,7 @@ requests. Changelog --------- -*OAuthLib is in active development, with the core of both OAuth 1 and 2 +*OAuthLib is in active development, with the core of both OAuth1 and OAuth2 completed, for providers as well as clients.* See `supported features`_ for details. diff --git a/oauthlib/common.py b/oauthlib/common.py index c1180e6..6364761 100644 --- a/oauthlib/common.py +++ b/oauthlib/common.py @@ -426,7 +426,6 @@ class Request(object): } self._params.update(dict(urldecode(self.uri_query))) self._params.update(dict(self.decoded_body or [])) - self._params.update(self.headers) def __getattr__(self, name): if name in self._params: diff --git a/tests/test_common.py b/tests/test_common.py index fb4bd5b..f239368 100644 --- a/tests/test_common.py +++ b/tests/test_common.py @@ -214,6 +214,11 @@ class RequestTest(TestCase): self.assertNotIn('bar', repr(r)) self.assertIn('<SANITIZED>', repr(r)) + def test_headers_params(self): + r = Request(URI, headers={'token': 'foobar'}, body='token=banana') + self.assertEqual(r.headers['token'], 'foobar') + self.assertEqual(r.token, 'banana') + class CaseInsensitiveDictTest(TestCase): |