SF bug #1347874; FeedParser does not comply with RFC2822.
Change headerRE as suggested in the bug report, so that single character
headers are accepted. Test case added too. Will backport to Python 2.4.
diff --git a/Lib/email/FeedParser.py b/Lib/email/FeedParser.py
index 5aad15d..a2130e2 100644
--- a/Lib/email/FeedParser.py
+++ b/Lib/email/FeedParser.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2004 Python Software Foundation
+# Copyright (C) 2004-2006 Python Software Foundation
# Authors: Baxter, Wouters and Warsaw
# Contact: email-sig@python.org
@@ -29,7 +29,7 @@
NLCRE_crack = re.compile('(\r\n|\r|\n)')
# RFC 2822 $3.6.8 Optional fields. ftext is %d33-57 / %d59-126, Any character
# except controls, SP, and ":".
-headerRE = re.compile(r'^(From |[\041-\071\073-\176]{2,}:|[\t ])')
+headerRE = re.compile(r'^(From |[\041-\071\073-\176]{1,}:|[\t ])')
EMPTYSTRING = ''
NL = '\n'