Comment 6 for bug 1342080

Revision history for this message
Sabari Murugesan (smurugesan) wrote :

The traceback can be attributed both to python-glanceclient & 'request' library.

python-glanceclient: During chunked http image upload, we create a chunk for EOF while reading image file. Glance-api treats this as the end of chunked transmission and sends a 201 response. But the 'requests' library also sends the last-chunk for which the server tries to respond with 400 but tracebacks because the client has already closed the socket. I have uploaded a patch to correct the behavior in python-glanceclient.

'requests': httplib checks chunk_size in request.body before sending over socket. If it's empty it assumes end-of-transmission and does not send to the server. But 'requests' doesn't seem to do so. I am planning to provide a pull-request to 'requests'.