Merge pull request #628 from dagwieers/patch-1

Spurious newline could corrupt payload
This commit is contained in:
Greg DeKoenigsberg 2015-06-19 09:29:59 -04:00
commit c8295f518f

View file

@ -120,11 +120,10 @@ def main():
atexit.register(conn.close)
remote_path = vmware_path(datastore, datacenter, dest)
auth = base64.encodestring('%s:%s' % (login, password))
auth = base64.encodestring('%s:%s' % (login, password)).rstrip()
headers = {
"Content-Type": "application/octet-stream",
"Content-Length": str(len(data)),
"Accept": "text/plain",
"Authorization": "Basic %s" % auth,
}