Skip to content
Myr

Fix 'Transfer-Encoding: chunked' change

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Braulio Valdivielso Martínez · committed by Braulio Valdivielso Martínez · parent 6f6b2fd · Browse files · 1 file+1 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−3 removed

  • other:+1 added−3 removed

1 file+1 added−3 removed

modified:requests/models.py+1 added-3 removed
432 unmodified lines
433434 if files:435 raise NotImplementedError('Streamed bodies and files are mutually exclusive.')436437 if length is not None:437 if length:438 self.headers['Content-Length'] = builtin_str(length)439 else:440 self.headers['Transfer-Encoding'] = 'chunked'441 else:
3 unmodified lines
445 else:446 if data:447 body = self._encode_params(data)448 if isinstance(data, basestring) or hasattr(data, 'read'):449 if hasattr(data, 'fileno') and length == 0:450 self.headers['Transfer-Encoding'] = 'chunked'449 content_type = None450 else:451 content_type = 'application/x-www-form-urlencoded'452
396 unmodified lines