Regressed Submitting empty file input control results in no Content-Type

Published: | Categories: DOM

Description

Firefox 45 has introduced a regression where submitting a <form enctype="multipart/form-data"> with an empty <input type="file"> fails to send the Content-Type HTTP header as well as the filename field in the Content-Disposition header, potentially breaking the application’s server-side logic while parsing the form data.

Actual:

Content-Disposition: form-data; name="multipartFileList"

Expected:

Content-Type: application/octet-stream
Content-Disposition: form-data; name="multipartFileList"; filename=""

This bug has been fixed with Firefox 45.0.2.

References