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 daz
Recipients daz
Date 2010-03-04.16:57:07
SpamBayes Score 0.0011693985
Marked as misclassified No
Message-id <1267721829.4.0.200487956077.issue8058@psf.upfronthosting.co.za>
In-reply-to
Content
get_filename() does not parse the Content-Type header for a "name" parameter. This is the old-style RFC 1341 header. Example:

Content-Type: application/octet-stream;
 name="somefile.pdf"
Content-Transfer-Encoding: base64

The email package documentation states:

get_filename([failobj])
    Return the value of the filename parameter of the Content-Disposition header of the message. If the header does not have a filename parameter, this method falls back to looking for the name parameter. If neither is found, or the header is missing, then failobj is returned...

As documented, get_filename() falls back to looking for the "name"
parameter in the Content-Disposition header. Instead, it should fall
back to looking for the "name" parameter in the Content-Type header.
History
Date User Action Args
2010-03-04 16:57:09dazsetrecipients: + daz
2010-03-04 16:57:09dazsetmessageid: <1267721829.4.0.200487956077.issue8058@psf.upfronthosting.co.za>
2010-03-04 16:57:07dazlinkissue8058 messages
2010-03-04 16:57:07dazcreate