MalformedXML error when writing an empty file

Issue #220 new
Jamieson Warner created an issue

Writing an empty string to a file gives an S3ResponseError.

from import default_storage
f ='---test', 'w')
# S3ResponseError: 400 Bad Request

Here's what happens:

  1. There are no parts in the multipart request
  2. When it's time to send the multipart request to S3, spits out the xml string

which S3 doesn't like. If you write an empty string to a file and then close it, it should just blank the file.

Comments (1)

  1. Log in to comment