From: Cory Benfield Date: Wed, 1 May 2013 20:49:46 +0000 (+0100) Subject: Instantiate the CID directly. X-Git-Tag: v2.0~5^2~16^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7de6b1e1626b72ae473def49ccc1764d11323167;p=services%2Fpython-requests.git Instantiate the CID directly. No need to do this the slow way now. Thanks to Colin (@cdunklau) for the idea. --- diff --git a/requests/models.py b/requests/models.py index 62cd0f5..10fa1f0 100644 --- 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()