From 66916be1ad5bbc0cdc19928ee35e5e8f4e4a3915 Mon Sep 17 00:00:00 2001 From: Rick Harris Date: Fri, 5 Aug 2011 00:12:19 +0000 Subject: Read response to reset HTTPConnection state machine --- plugins/xenserver/xenapi/etc/xapi.d/plugins/glance | 3 +++ 1 file changed, 3 insertions(+) (limited to 'plugins') diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance b/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance index 17a5dbbfb..a06312890 100755 --- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance +++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance @@ -261,6 +261,9 @@ def _upload_tarball(staging_path, image_id, glance_host, glance_port, os_type, if header.lower().startswith("x-image-meta-property-"): headers[header.lower()] = value + # Toss body so connection state-machine is ready for next request/response + resp.read() + # NOTE(sirp): httplib under python2.4 won't accept a file-like object # to request conn.putrequest('PUT', '/v1/images/%s' % image_id) -- cgit