]> granicus.if.org Git - python/commit
Recognize '<>' as a special case of an angle-addr in header_value_parser.
authorR David Murray <rdmurray@bitdance.com>
Sat, 26 May 2012 18:31:12 +0000 (14:31 -0400)
committerR David Murray <rdmurray@bitdance.com>
Sat, 26 May 2012 18:31:12 +0000 (14:31 -0400)
commit032eed3c4a42ca29de2c07fba2e0555eaff1700c
tree61a12aaf27af7c9a8a024bb2625c888226c6681c
parentd785cb3955e61098056a237b6f322bdda1461aa0
Recognize '<>' as a special case of an angle-addr in header_value_parser.

Although '<>' is invalid according to RFC 5322, SMTP uses it for various
things, and it sometimes ends up in email headers.  This patch changes
get_angle_addr to recognize it and just register a Defect instead of raising a
parsing error.
Lib/email/_header_value_parser.py
Lib/test/test_email/test__header_value_parser.py