swiftclient returns response headers without 'Content-Length' param, thus causing upload object to fail
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-swiftclient |
Invalid
|
Undecided
|
Arun Mani |
Bug Description
When trying to upload the data in swift, the _upload_
2016-09-07 10:59:20.870 35831 DEBUG swiftclient [-] RESP STATUS: 200 OK http_log /usr/lib/
2016-09-07 10:59:20.870 35831 DEBUG swiftclient [-] RESP HEADERS: {u'X-Object-
2016-09-07 10:59:20.872 35831 ERROR swiftclient.service [-] int() argument must be a string or a number, not 'NoneType'
2016-09-07 10:59:20.872 35831 ERROR swiftclient.service Traceback (most recent call last):
2016-09-07 10:59:20.872 35831 ERROR swiftclient.service File "/usr/lib/
2016-09-07 10:59:20.872 35831 ERROR swiftclient.service cl = int(headers.
2016-09-07 10:59:20.872 35831 ERROR swiftclient.service TypeError: int() argument must be a string or a number, not 'NoneType'
2016-09-07 10:59:20.872 35831 ERROR swiftclient.service
2016-09-07 10:59:20.877 35831 DEBUG nova_powervm.
Hence, if 'Content-Length' isn't present in the response headers the code should handle it more gracefully.
Changed in python-swiftclient: | |
assignee: | nobody → Arun Mani (arun-mani) |
Changed in python-swiftclient: | |
status: | New → In Progress |
Changed in python-swiftclient: | |
status: | In Progress → Invalid |
The possible reason for this failure could be due to when upload operation is attempted to upload an empty file it results in the TypeError. Found a similar bug, https:/ /bugs.launchpad .net/python- swiftclient/ +bug/1586690. Don't think it's fixed yet. Hence, proposing a new fix