python/dist/src/Lib/email FeedParser.py, 1.12, 1.13

Update of /cvsroot/python/python/dist/src/Lib/email In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19352/Lib/email Modified Files: FeedParser.py Log Message: RFC 2822 describes the characters allowed in a header field name. Conform to this, and add test cases. Index: FeedParser.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/email/FeedParser.py,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- FeedParser.py 28 Nov 2004 00:21:41 -0000 1.12 +++ FeedParser.py 29 Nov 2004 03:46:54 -0000 1.13 @@ -27,7 +27,9 @@ NLCRE_bol = re.compile('(\r\n|\r|\n)') NLCRE_eol = re.compile('(\r\n|\r|\n)$') NLCRE_crack = re.compile('(\r\n|\r|\n)') -headerRE = re.compile(r'^(From |[-\w]{2,}:|[\t ])') +# 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 ])') EMPTYSTRING = '' NL = '\n'
participants (1)
-
bwarsaw@users.sourceforge.net