Uploading files on a custom domain results in the contents of a 404 page being sent to S3, leading to a MaxPostPreDataLengthExceeded error (BB-9352)
When I try to upload a file to a repository's download section while making the request from a custom domain, an XHR request is made to
http://<domain>/site/mimeguess/<filename>, which returns a 404 Not Found error. The value of the hidden Content-Type field is then set to the contents of the 404 page. The 404 page also appears to be the initial value of that field once the page is loaded, according to Firefox's inspector. Changing the value of the Content-Type field to
application/octet-stream before submitting the form does not work, as the request to mimeguess is made after I click the submit button.
After the form submission completes, Amazon S3 returns:
<?xml version="1.0" encoding="UTF-8"?> <Error> <Code>MaxPostPreDataLengthExceeded</Code> <Message>Your POST request fields preceeding the upload file was too large.</Message> <MaxPostPreDataLengthBytes>20480</MaxPostPreDataLengthBytes> <RequestId>A88397D7396072A9</RequestId> <HostId>i1h9kVyPj3QXvFpaQBg4AAR92lhVqdPbbgqv3xrfz7HYvbkFJrch2wTVJfdYMOCl</HostId> </Error>
I am using Firefox 24 on Fedora 18 x86_64.