Skip to content
Myr

Always add Content-Length to HTTP PATCH.

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

authored by Johnny Goodnow · committed by Johnny Goodnow · parent 4cac9f0 · Browse files · 1 file+1 added−1 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−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:requests/models.py+1 added-1 removed
390 unmodified lines
391 self.headers['Content-Length'] = str(body.tell())392 body.seek(0, 0)393 elif body is not None:394 self.headers['Content-Length'] = str(len(body))395 elif self.method in ('POST', 'PUT'):395 elif self.method in ('POST', 'PUT', 'PATCH'):396 self.headers['Content-Length'] = '0'397398 def prepare_auth(self, auth):399 """Prepares the given HTTP auth data."""
259 unmodified lines