Commit bf2e0aaf authored by R. David Murray's avatar R. David Murray

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.
........
parent 70affb37
...@@ -681,7 +681,7 @@ class Message: ...@@ -681,7 +681,7 @@ class Message:
missing = object() missing = object()
filename = self.get_param('filename', missing, 'content-disposition') filename = self.get_param('filename', missing, 'content-disposition')
if filename is missing: if filename is missing:
filename = self.get_param('name', missing, 'content-disposition') filename = self.get_param('name', missing, 'content-type')
if filename is missing: if filename is missing:
return failobj return failobj
return utils.collapse_rfc2231_value(filename).strip() return utils.collapse_rfc2231_value(filename).strip()
......
...@@ -16,16 +16,14 @@ X-Oblique-Strategy: Make a door into a window ...@@ -16,16 +16,14 @@ X-Oblique-Strategy: Make a door into a window
--h90VIIIKmx --h90VIIIKmx
Content-Type: text/plain Content-Type: text/plain; name="msg.txt"
Content-Disposition: inline; name="msg.txt"
Content-Transfer-Encoding: 7bit Content-Transfer-Encoding: 7bit
a simple kind of mirror a simple kind of mirror
to reflect upon our own to reflect upon our own
--h90VIIIKmx --h90VIIIKmx
Content-Type: text/plain Content-Type: text/plain; name="msg.txt"
Content-Disposition: inline; name="msg.txt"
Content-Transfer-Encoding: 7bit Content-Transfer-Encoding: 7bit
a simple kind of mirror a simple kind of mirror
......
...@@ -820,6 +820,7 @@ David Wolever ...@@ -820,6 +820,7 @@ David Wolever
Klaus-Juergen Wolf Klaus-Juergen Wolf
Dan Wolfe Dan Wolfe
Richard Wolff Richard Wolff
Darren Worrall
Gordon Worley Gordon Worley
Thomas Wouters Thomas Wouters
Heiko Wundram Heiko Wundram
......
...@@ -87,6 +87,9 @@ C-API ...@@ -87,6 +87,9 @@ C-API
Library 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 - Make tokenize.detect_coding() normalize utf-8 and iso-8859-1 variants like the
builtin tokenizer. builtin tokenizer.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment