[Python-checkins] r75308 - in python/branches/release31-maint: Lib/email/message.py Lib/email/test/data/msg_44.txt Misc/ACKS Misc/NEWS

r.david.murray python-checkins at python.org
Sat Oct 10 02:57:05 CEST 2009


Author: r.david.murray
Date: Sat Oct 10 02:57:04 2009
New Revision: 75308

Log:
Merged revisions 75307 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r75307 | r.david.murray | 2009-10-09 20:13:32 -0400 (Fri, 09 Oct 2009) | 12 lines
  
  Merged revisions 75301 via svnmerge from 
  svn+ssh://pythondev@svn.python.org/python/trunk
  
  ........
    r75301 | r.david.murray | 2009-10-09 17:50:54 -0400 (Fri, 09 Oct 2009) | 5 lines
    
    Issue #7082: When falling back to the MIME 'name' parameter, the
    correct place to look for it is the Content-Type header.
    
    Patch by Darren Worrall.
  ........
................


Modified:
   python/branches/release31-maint/   (props changed)
   python/branches/release31-maint/Lib/email/message.py
   python/branches/release31-maint/Lib/email/test/data/msg_44.txt
   python/branches/release31-maint/Misc/ACKS
   python/branches/release31-maint/Misc/NEWS

Modified: python/branches/release31-maint/Lib/email/message.py
==============================================================================
--- python/branches/release31-maint/Lib/email/message.py	(original)
+++ python/branches/release31-maint/Lib/email/message.py	Sat Oct 10 02:57:04 2009
@@ -681,7 +681,7 @@
         missing = object()
         filename = self.get_param('filename', missing, 'content-disposition')
         if filename is missing:
-            filename = self.get_param('name', missing, 'content-disposition')
+            filename = self.get_param('name', missing, 'content-type')
         if filename is missing:
             return failobj
         return utils.collapse_rfc2231_value(filename).strip()

Modified: python/branches/release31-maint/Lib/email/test/data/msg_44.txt
==============================================================================
--- python/branches/release31-maint/Lib/email/test/data/msg_44.txt	(original)
+++ python/branches/release31-maint/Lib/email/test/data/msg_44.txt	Sat Oct 10 02:57:04 2009
@@ -16,16 +16,14 @@
 
 
 --h90VIIIKmx
-Content-Type: text/plain
-Content-Disposition: inline; name="msg.txt"
+Content-Type: text/plain; name="msg.txt"
 Content-Transfer-Encoding: 7bit
 
 a simple kind of mirror
 to reflect upon our own
 
 --h90VIIIKmx
-Content-Type: text/plain
-Content-Disposition: inline; name="msg.txt"
+Content-Type: text/plain; name="msg.txt"
 Content-Transfer-Encoding: 7bit
 
 a simple kind of mirror

Modified: python/branches/release31-maint/Misc/ACKS
==============================================================================
--- python/branches/release31-maint/Misc/ACKS	(original)
+++ python/branches/release31-maint/Misc/ACKS	Sat Oct 10 02:57:04 2009
@@ -811,6 +811,7 @@
 Klaus-Juergen Wolf
 Dan Wolfe
 Richard Wolff
+Darren Worrall
 Gordon Worley
 Thomas Wouters
 Heiko Wundram

Modified: python/branches/release31-maint/Misc/NEWS
==============================================================================
--- python/branches/release31-maint/Misc/NEWS	(original)
+++ python/branches/release31-maint/Misc/NEWS	Sat Oct 10 02:57:04 2009
@@ -27,6 +27,9 @@
 Library
 -------
 
+- Issue #7082: When falling back to the MIME 'name' parameter, the
+  correct place to look for it is the Content-Type header.
+
 - Make tokenize.detect_coding() normalize utf-8 and iso-8859-1 variants like the
   builtin tokenizer.
 


More information about the Python-checkins mailing list