Skip to content

Commit 174a0c1

Browse files
committed
remove Content-Length patch for PUT requests
This was a bug in httplib, but it has since been fixed. See http://bugs.python.org/issue14721 for details.
1 parent fbacdf0 commit 174a0c1

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

swiftype/swiftype.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,6 @@ def _request(self, method, path, params={}, data={}):
178178
headers = {}
179179
headers['User-Agent'] = USER_AGENT
180180
headers['Content-Type'] = 'application/json'
181-
if method == 'PUT' and len(data) == 0:
182-
headers['Content-Length'] = 0
183181

184182
if self.__username is not None and self.__password is not None:
185183
credentials = "%s:%s" % (self.__username, self.__password)

0 commit comments

Comments
 (0)