mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-04 17:53:10 +00:00
Spurious newline could corrupt payload
Due to a spurious newline we corrupted the payload. It depends on the order of the headers and if there were headers added by vSphere. The Accept header was also not needed.
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user