]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
get_filename(), get_content_charset(): It's possible that the charset named in
authorBarry Warsaw <barry@python.org>
Fri, 29 Apr 2005 12:12:02 +0000 (12:12 +0000)
committerBarry Warsaw <barry@python.org>
Fri, 29 Apr 2005 12:12:02 +0000 (12:12 +0000)
commit712d474d3c32a7675431e518a5f2ebd4551d8903
treed4373897b27d4de0d67944febca4d552b8cc4457
parentaf0659fe301838a97d3c42f822e1633a3b3478d5
get_filename(), get_content_charset(): It's possible that the charset named in
an RFC 2231-style header could be bogus or unknown to Python.  In that case,
we return the the text part of the parameter undecoded.  However, in
get_content_charset(), if that is not ascii, then it is an illegal charset and
so we return failobj.

Test cases and a version bump are included.

Committing this to the Python 2.3 branch because I need to generate an email
2.5.6 release that contains these patches.  I will port these fixes to Python
2.4 and 2.5 for email 3.x.
Lib/email/Message.py
Lib/email/__init__.py
Lib/email/test/test_email.py