aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_email/test_headerregistry.py
diff options
context:
space:
mode:
authorAbhilash Raj <maxking@users.noreply.github.com>2019-06-05 12:56:33 -0400
committerBarry Warsaw <barry@python.org>2019-06-05 09:56:33 -0700
commit66c4f3f38b867d8329b28c032bb907fd1a2f22d2 (patch)
treebed2fe319cf50ffbc6d2ac2c89d5f167df4e9d48 /Lib/test/test_email/test_headerregistry.py
parent142566c028720934325f0b7fe28680afd046e00f (diff)
downloadcpython-66c4f3f38b867d8329b28c032bb907fd1a2f22d2.tar.gz
cpython-66c4f3f38b867d8329b28c032bb907fd1a2f22d2.zip
bpo-21315: Fix parsing of encoded words with missing leading ws. (#13425)
* bpo-21315: Fix parsing of encoded words with missing leading ws. Because of missing leading whitespace, encoded word would get parsed as unstructured token. This patch fixes that by looking for encoded words when splitting tokens with whitespace. Missing trailing whitespace around encoded word now register a defect instead. Original patch suggestion by David R. Murray on bpo-21315.
Diffstat (limited to 'Lib/test/test_email/test_headerregistry.py')
-rw-r--r--Lib/test/test_email/test_headerregistry.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_email/test_headerregistry.py b/Lib/test/test_email/test_headerregistry.py
index 75505460aba..5d9b3576d30 100644
--- a/Lib/test/test_email/test_headerregistry.py
+++ b/Lib/test/test_email/test_headerregistry.py
@@ -1180,7 +1180,8 @@ class TestAddressHeader(TestHeaderBase):
'rfc2047_atom_in_quoted_string_is_decoded':
('"=?utf-8?q?=C3=89ric?=" <foo@example.com>',
- [errors.InvalidHeaderDefect],
+ [errors.InvalidHeaderDefect,
+ errors.InvalidHeaderDefect],
'Éric <foo@example.com>',
'Éric',
'foo@example.com',