]> granicus.if.org Git - python/commit
#23745: handle duplicate MIME parameter names in new parser.
authorR David Murray <rdmurray@bitdance.com>
Mon, 30 Mar 2015 01:53:05 +0000 (21:53 -0400)
committerR David Murray <rdmurray@bitdance.com>
Mon, 30 Mar 2015 01:53:05 +0000 (21:53 -0400)
commit7d0325d6c811d66d98955e9fbf9a71c50f7e770c
treec5d0fd4e964ea1e64cbc75f0da85d5de03e81c93
parenta3a100b594982f10911f2c9db6cf954bb8ff8f20
#23745: handle duplicate MIME parameter names in new parser.

This mimics get_param's error handling for the most part.  It is slightly
better in some regards as get_param can produce some really weird results for
duplicate *0* parts.  It departs from get_param slightly in that if we have a
mix of non-extended and extended pieces for the same parameter name, the new
parser assumes they were all supposed to be extended and concatenates all the
values, whereas get_param always picks the non-extended parameter value.  All
of this error recovery is pretty much arbitrary decisions...
Lib/email/_header_value_parser.py
Lib/test/test_email/test__header_value_parser.py
Misc/NEWS