Skip to content

Commit

Permalink
Merge branch 'master' into 445_confirm_redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanHuot committed Aug 20, 2018
2 parents 0ac839f + 8cb3d72 commit 153b726
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
8 changes: 4 additions & 4 deletions README.rst
@@ -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+.*
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.

Expand Down
1 change: 0 additions & 1 deletion oauthlib/common.py
Expand Up @@ -426,7 +426,6 @@ def __init__(self, uri, http_method='GET', body=None, headers=None,
}
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:
Expand Down
5 changes: 5 additions & 0 deletions tests/test_common.py
Expand Up @@ -214,6 +214,11 @@ def test_password_body(self):
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):

Expand Down

0 comments on commit 153b726

Please sign in to comment.