mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
Instantiate the CID directly.
No need to do this the slow way now. Thanks to Colin (@cdunklau) for the idea.
This commit is contained in:
+1
-2
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user