From: Alexander Nelzin Date: Wed, 12 Nov 2014 12:35:27 +0000 (+0300) Subject: Fixed. X-Git-Tag: v2.5.0~8^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ee50afef59ca47879144448ae056a2836f3d4534;p=services%2Fpython-requests.git Fixed. --- diff --git a/requests/models.py b/requests/models.py index 3f6a4f9..2370b67 100644 --- a/requests/models.py +++ b/requests/models.py @@ -472,7 +472,7 @@ class PreparedRequest(RequestEncodingMixin, RequestHooksMixin): l = super_len(body) if l: self.headers['Content-Length'] = builtin_str(l) - elif self.method not in ('GET', 'HEAD'): + elif (self.method not in ('GET', 'HEAD')) and (self.headers.get('Content-Length') is None): self.headers['Content-Length'] = '0' def prepare_auth(self, auth, url=''):