Add missing boundary at end of multipart/form-data request body for requests that include no application/octet-stream data

This makes the sync request sent to the /download endpoint valid multipart/form-data according to RFC 2046, 5.1
This commit is contained in:
Christoph Mack 2016-09-03 14:09:36 +02:00
parent 72f128156e
commit 079d551782

View File

@ -582,7 +582,7 @@ Content-Type: application/octet-stream\r\n\r\n""")
tgt.close()
break
tgt.write(data)
buf.write(b'\r\n' + bdry + b'--\r\n')
buf.write(b'\r\n' + bdry + b'--\r\n')
size = buf.tell()
# connection headers
headers = {