classification
Title: Patch for get_filename in email.message when content-disposition is missing
Type: behavior Stage: committed/rejected
Components: Library (Lib) Versions: Python 3.2, Python 3.1, Python 2.7, Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: r.david.murray Nosy List: DazWorrall, barry, r.david.murray (3)
Priority: normal Keywords patch

Created on 2009-10-08 12:38 by DazWorrall, last changed 2009-10-27 23:42 by r.david.murray.

Files
File name Uploaded Description Edit Remove
message-getfilename.patch DazWorrall, 2009-10-08 12:50 Patch against 2.7 trunk
Messages (6)
msg93743 - (view) Author: Darren Worrall (DazWorrall) Date: 2009-10-08 12:43
Finger spasm submitted this without a comment, apologies.

I believe the fix applied in http://bugs.python.org/issue1403349 is not
actually correct. In the case where Content-Disposition is missing, the
'name' parameter should be on Content-Type - but the original patch
looks for 'name' on Content-Disposition, which doesn't exist.
msg93744 - (view) Author: Darren Worrall (DazWorrall) Date: 2009-10-08 12:50
Patch is against 2.7 trunk, but should backport without any resistance.
msg93759 - (view) Author: R. David Murray (r.david.murray) Date: 2009-10-08 19:44
2.4 and 2.5 are open only for security patches, which this is not, so
I've removed them from versions, and added 3.1 and 3.2, which have the
same code.

The patch looks appropriate to me, and is what the original bug report
requested.

Note that the Content-Type name parameter has been deprecated for a long
time...see for example this thread:
http://www.imc.org/ietf-822/old-archive2/msg02121.html.  Support is
still required, however, since Microsoft's .NET framework, at least,
still supports setting the parameter (see
http://msdn.microsoft.com/en-us/library/system.net.mime.contenttype.name.aspx)
msg93783 - (view) Author: Darren Worrall (DazWorrall) Date: 2009-10-09 10:53
Indeed, I'm certainly not constructing messages like that, but
occasionally have to process them :)

RE: the python versions, I'll remember that in future, thanks.
msg93816 - (view) Author: R. David Murray (r.david.murray) Date: 2009-10-10 01:08
Applied to trunk in r75301, py3k in r75307, and 3.1 in r75308.  Leaving
open until I can backport it to 2.6.  Thanks, Darren.
msg94593 - (view) Author: R. David Murray (r.david.murray) Date: 2009-10-27 23:42
Fixed in 2.6 in r75897.
History
Date User Action Args
2009-10-27 23:42:47r.david.murraysetstatus: open -> closed

messages: + msg94593
2009-10-10 01:08:04r.david.murraysetresolution: fixed
messages: + msg93816
stage: commit review -> committed/rejected
2009-10-09 21:47:16r.david.murraysetassignee: r.david.murray
2009-10-09 10:53:40DazWorrallsetmessages: + msg93783
2009-10-08 19:45:52r.david.murraysetstage: patch review -> commit review
2009-10-08 19:44:17r.david.murrayset
nosy: + r.david.murray
versions: + Python 3.1, Python 3.2, - Python 2.5, Python 2.4
messages: + msg93759
priority: normal
type: behavior
stage: patch review
2009-10-08 13:55:55DazWorrallsettitle: Patch for get attachments in email -> Patch for get_filename in email.message when content-disposition is missing
2009-10-08 12:54:17DazWorrallsetnosy: + barry

versions: + Python 2.6, Python 2.5, Python 2.4
2009-10-08 12:50:40DazWorrallsetfiles: + message-getfilename.patch
keywords: + patch
messages: + msg93744
2009-10-08 12:43:46DazWorrallsetmessages: + msg93743
components: + Library (Lib)
2009-10-08 12:38:33DazWorrallcreate