projects
/
services
/
python-requests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ec2859c
)
Instantiate the CID directly.
author
Cory Benfield
<lukasaoz@gmail.com>
Wed, 1 May 2013 20:49:46 +0000
(21:49 +0100)
committer
Cory Benfield
<lukasaoz@gmail.com>
Mon, 29 Jul 2013 13:52:44 +0000
(14:52 +0100)
No need to do this the slow way now. Thanks to Colin (@cdunklau) for the
idea.
requests/models.py
patch
|
blob
|
history
diff --git
a/requests/models.py
b/requests/models.py
index 62cd0f564e23f5d990b80620121756265c22b9e0..10fa1f0f7d3b291145296a6c4b297c135a120f89 100644
(file)
--- a/
requests/models.py
+++ b/
requests/models.py
@@
-346,8
+346,7
@@
class PreparedRequest(RequestEncodingMixin, RequestHooksMixin):
"""Prepares the given HTTP headers."""
if headers:
- headers = dict((to_native_string(name), value) for name, value in headers.items())
- self.headers = CaseInsensitiveDict(headers)
+ self.headers = CaseInsensitiveDict((to_native_string(name), value) for name, value in headers.items())
else:
self.headers = CaseInsensitiveDict()