mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
Always add Content-Length to HTTP PATCH.
This commit is contained in:
+1
-1
@@ -392,7 +392,7 @@ class PreparedRequest(RequestEncodingMixin, RequestHooksMixin):
|
||||
body.seek(0, 0)
|
||||
elif body is not None:
|
||||
self.headers['Content-Length'] = str(len(body))
|
||||
elif self.method in ('POST', 'PUT'):
|
||||
elif self.method in ('POST', 'PUT', 'PATCH'):
|
||||
self.headers['Content-Length'] = '0'
|
||||
|
||||
def prepare_auth(self, auth):
|
||||
|
||||
Reference in New Issue
Block a user