And Clover <a...@doxdesk.com> added the comment:
HTTP generally isn't an RFC 822-family standard. Its headers look a lot like it, but they have their own defined syntax that differs in niggling little details. Using mail parsing code for HTTP isn't usually the right thing. HTTP has always used its own syntax definitions for the headers on the main request/response entities, but it has traditionally partially deferred to RFC 822-family specs for the definitions of structured entity bodies. This is moot, however, as the reality of what browsers support has rarely coincided with those specs. Nowadays HTML5.2 explicitly defers to RFC 7578 for definition of multipart/form-data headers. (This RFC is a replacement for the vague and broken RFC 2388.) As is to be expected for an HTML5-related spec, RFC 7578 shrugs and documents existing browser behaviour [section 4.2]: - some browsers do UTF-8 - some browsers do data mangling (IE's %-encoding sadness) - some browsers might do something else but it explicitly rules out the solution proposed here: "The encoding method described in [RFC5987], which would add a 'filename*' parameter to the Content-Disposition header field, MUST NOT be used." The introductions of both RFC 5987 and RFC 6266 explicitly exclude multipart/form-data headers from their remit. So in summary: - we shouldn't do anything - the situation with submitted filenames will continue to be broken for everyone indefinitely ---------- nosy: +aclover _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue23434> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com