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 r.david.murray
Recipients Myroslav.Opyr, barry, demian.brecht, ezio.melotti, martin.panter, pawciobiel, piotr.dobrogost, r.david.murray, serhiy.storchaka, vstinner
Date 2018-03-23.02:26:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1521772003.58.0.467229070634.issue23434@psf.upfronthosting.co.za>
In-reply-to
Content
I haven't read the http rfcs, but my understanding is that they follow the MIME standards, and the email library already has code to do proper parsing and decoding of encoded filenames in Content-Disposition headers.  It should be possible to call that code for this use case (the http libraries already depend on the email libraries, although I'm not sure if cgi itself does currently).  There may be additional considerations involved in fully supporting the http RFCs, but to determine that someone will need to read both and understand them, which is not a small undertaking :)

In the meantime, I'm pretty sure that using the existing mime header parsing code in the email library (see email.headerregistry) will provide better parsing than the only-handles-simple-cases heuristic in your PR.  Granted, I don't think you have to deal with multi-part headers in http, but I vaguely remember that there are other subtleties not handled by a simple split on '.
History
Date User Action Args
2018-03-23 02:26:43r.david.murraysetrecipients: + r.david.murray, barry, vstinner, ezio.melotti, Myroslav.Opyr, martin.panter, piotr.dobrogost, serhiy.storchaka, demian.brecht, pawciobiel
2018-03-23 02:26:43r.david.murraysetmessageid: <1521772003.58.0.467229070634.issue23434@psf.upfronthosting.co.za>
2018-03-23 02:26:43r.david.murraylinkissue23434 messages
2018-03-23 02:26:41r.david.murraycreate