]> granicus.if.org Git - python/commitdiff
Merged revisions 75301 via svnmerge from
authorR. David Murray <rdmurray@bitdance.com>
Tue, 27 Oct 2009 23:39:06 +0000 (23:39 +0000)
committerR. David Murray <rdmurray@bitdance.com>
Tue, 27 Oct 2009 23:39:06 +0000 (23:39 +0000)
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 129f4ba405c61fc7aac33b5cedd9fb15afe5b791..db09deefe26b5e619f056436c8a8086ac4a8c6d2 100644 (file)
@@ -674,7 +674,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 592e721435bba32a223fc53d57ed7e32a0d96473..f1470ba8071e03bffd205d4dc8a513555d562219 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -781,6 +781,7 @@ Klaus-Juergen Wolf
 Dan Wolfe
 Richard Wolff
 Gordon Worley
+Darren Worrall
 Thomas Wouters
 Heiko Wundram
 Doug Wyatt
index 412a52c1266b286cabe737aaef43f7d47dc0a95b..400450fab612390015738bf30c6434e0dd51ae63 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -24,6 +24,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.
+
 - Issue #7099: Decimal.is_normal now returns True for numbers with exponent
   larger than emax.