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:
Cory Benfield
2013-05-01 21:49:46 +01:00
parent ec2859c0de
commit 7de6b1e162
+1 -2
View File
@@ -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()