playframework/Play20 — pull request #602 by jroper (2012-12-11 05:26:02+00:00)
Title: Removed MissingFilePart

MissingFilePart was confusing and unnecessary:

* The name and its associated comment (A file part with no content provided) made it seem like there was a file part specified, but the content was missing from the transmission. In fact, the only time it was returned is if the file name was blank.
* RFC-1867 (Form-based File Upload in HTML) makes it clear that filename is optional, and makes no statement as to whether it may or may not be a blank string.
* Play itself has no dependence on the filename (when we store a temporary file we generate our own file name with no relation to the filename passed in by the user).
* Users have reported problems where they upload a file, but the filename was blank, and so Play was reporting this misleading error - https://groups.google.com/d/msg/play-framework/eoYBJq-18Sc/2fVHO2you-8J

Generally, the browser will send a filename, only in some cases (as described by the user in the forum post above) will an empty filename be sent, so rather than Play heavy handedly deciding not to parse the content in that case, I think we should parse the content and pass the empty file name to the user, and let them decide how it should be handled.