This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author aclover
Recipients Myroslav.Opyr, aclover, barry, demian.brecht, ezio.melotti, martin.panter, pawciobiel, piotr.dobrogost, r.david.murray, serhiy.storchaka, vstinner
Date 2020-01-02.23:23:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1578007432.43.0.747332074151.issue23434@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2020-01-02 23:23:52acloversetrecipients: + aclover, barry, vstinner, ezio.melotti, r.david.murray, Myroslav.Opyr, martin.panter, piotr.dobrogost, serhiy.storchaka, demian.brecht, pawciobiel
2020-01-02 23:23:52acloversetmessageid: <1578007432.43.0.747332074151.issue23434@roundup.psfhosted.org>
2020-01-02 23:23:52acloverlinkissue23434 messages
2020-01-02 23:23:52aclovercreate