[Email-SIG] Patch: Improve recognition of attachment file name
Nando
nando at acapela.com.br
Wed Feb 13 14:32:13 CET 2008
Greetings, Mr. Barry Warsaw and all other Pythonistas,
How do you like this little patch?
$ svn diff
Index: message.py
===================================================================
--- message.py (revision 60758)
+++ message.py (working copy)
@@ -671,7 +671,10 @@
filename = self.get_param('filename', missing,
'content-disposition')
if filename is missing:
filename = self.get_param('name', missing,
'content-disposition')
+ # nando: Some messages specify the file name of attachment this
way:
if filename is missing:
+ filename = self.get_param('name', missing, 'content-type')
+ if filename is missing:
return failobj
return utils.collapse_rfc2231_value(filename).strip()
This is the first time I collaborate this way, so if there is anything
else I can do to help, let me know, cause I am sort of ignorant.
--
Nando Florestan
===============
[skype] nandoflorestan
[phone] + 55 (11) 3675-3038
[mobile] + 55 (11) 9820-5451
[internet] http://oui.com.br/
[À Capela] http://acapela.com.br/
[location] São Paulo - SP - Brasil
More information about the Email-SIG
mailing list