summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorRick Harris <rick.harris@rackspace.com>2011-08-05 00:12:19 +0000
committerRick Harris <rick.harris@rackspace.com>2011-08-05 00:12:19 +0000
commit66916be1ad5bbc0cdc19928ee35e5e8f4e4a3915 (patch)
tree779633e25525b96df110fc64a4e3296dcdc81902 /plugins
parent0fea610a6918089c53cc33335a4db4557820675f (diff)
downloadnova-66916be1ad5bbc0cdc19928ee35e5e8f4e4a3915.tar.gz
nova-66916be1ad5bbc0cdc19928ee35e5e8f4e4a3915.tar.xz
nova-66916be1ad5bbc0cdc19928ee35e5e8f4e4a3915.zip
Read response to reset HTTPConnection state machine
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/xenserver/xenapi/etc/xapi.d/plugins/glance3
1 files changed, 3 insertions, 0 deletions
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)