Merge pull request #2896 from BraulioVM/master

[WIP] Set 'Transfer-Encoding: chunked' if data is a file with length 0
This commit is contained in:
Ian Cordasco
2015-12-02 08:35:41 -06:00
+1 -1
View File
@@ -434,7 +434,7 @@ class PreparedRequest(RequestEncodingMixin, RequestHooksMixin):
if files:
raise NotImplementedError('Streamed bodies and files are mutually exclusive.')
if length is not None:
if length:
self.headers['Content-Length'] = builtin_str(length)
else:
self.headers['Transfer-Encoding'] = 'chunked'