diff options
author | Jonathan Huot <jonathan.huot@thomsonreuters.com> | 2018-08-18 01:02:52 +0200 |
---|---|---|
committer | Jonathan Huot <jonathan.huot@thomsonreuters.com> | 2018-08-18 01:02:52 +0200 |
commit | 39dad84a9b4cfa353ec3ed60aa8f8856957f6704 (patch) | |
tree | d34ceaa686e7c945b0fc6db7499a940fbdf144a8 | |
parent | ef0a2dda25da9f340223ee51dfd823a1ec8f1f1d (diff) | |
download | oauthlib-39dad84a9b4cfa353ec3ed60aa8f8856957f6704.tar.gz |
Remove headers from request attributes
-rw-r--r-- | oauthlib/common.py | 1 | ||||
-rw-r--r-- | tests/test_common.py | 5 |
2 files changed, 5 insertions, 1 deletions
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): |