]> granicus.if.org Git - python/commitdiff
Merged revisions 75307 via svnmerge from
authorR. David Murray <rdmurray@bitdance.com>
Sat, 10 Oct 2009 00:57:04 +0000 (00:57 +0000)
committerR. David Murray <rdmurray@bitdance.com>
Sat, 10 Oct 2009 00:57:04 +0000 (00:57 +0000)
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.
  ........
................

Lib/email/message.py
Lib/email/test/data/msg_44.txt
Misc/ACKS
Misc/NEWS

index 412a550d27509756de6bd3f56989c5ebf66fa8a2..d89e37e0b6178771d2d5a2f6bcaafc0b185bffe0 100644 (file)
@@ -681,7 +681,7 @@ class Message:
         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()
index ae462a61be65ab822eb419b12551138edd1dcbc6..15a225287bd8f7a107082b69e2e5817ce6ff1f64 100644 (file)
@@ -16,16 +16,14 @@ X-Oblique-Strategy: Make a door into a window
 
 
 --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
index 5ca044680c5e3b03183fff15658142a1f64633ad..e8005e9087d54c1f67f20373abac3b73445939d8 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -811,6 +811,7 @@ David Wolever
 Klaus-Juergen Wolf
 Dan Wolfe
 Richard Wolff
+Darren Worrall
 Gordon Worley
 Thomas Wouters
 Heiko Wundram
index 1d8d7446189c94e86a5157a1bee180e49e312b17..49e7d1a3708dcc5ff2d12db707495f07b9afe001 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -27,6 +27,9 @@ Core and Builtins
 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.