Requests can't handle a put call for very large data objects. However, it
can accept the data as a file-like object instead, and the size issue will
not show up. Documented here: https://github.com/psf/requests/issues/2717.
Issue: IT-19717
Change-Id: I826d3fa2eebbd3ba0389a0d7042701b4389e406d
Signed-off-by: Eric Ball <eball@linuxfoundation.org>
if parameters:
resp = requests.put(url, data=parameters, files=files)
else:
- resp = requests.put(url, data=upload_file.read())
+ resp = requests.put(url, data=upload_file)
except requests.exceptions.MissingSchema:
raise requests.HTTPError("Not valid URL format. Check for https:// etc..: {}".format(url))
except requests.exceptions.ConnectTimeout:
--- /dev/null
+---
+fixes:
+ - |
+ Requests can't handle a put call for very large data objects. However, it
+ can accept the data as a file-like object instead, and the size issue will
+ not show up. Documented here: https://github.com/psf/requests/issues/2717.