Changeset 391 for python/trunk/Lib/email/feedparser.py
- Timestamp:
- Mar 19, 2014, 11:31:01 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk
-
Property svn:mergeinfo
set to
/python/vendor/Python-2.7.6 merged eligible /python/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
python/trunk/Lib/email/feedparser.py
r2 r391 14 14 This completes the parsing and returns the root message object. 15 15 16 The other advantage of this parser is that it will never throwa parsing16 The other advantage of this parser is that it will never raise a parsing 17 17 exception. Instead, when it finds something unexpected, it adds a 'defect' to 18 18 the current message. Defects are just instances that live on the message … … 29 29 NLCRE = re.compile('\r\n|\r|\n') 30 30 NLCRE_bol = re.compile('(\r\n|\r|\n)') 31 NLCRE_eol = re.compile('(\r\n|\r|\n) $')31 NLCRE_eol = re.compile('(\r\n|\r|\n)\Z') 32 32 NLCRE_crack = re.compile('(\r\n|\r|\n)') 33 33 # RFC 2822 $3.6.8 Optional fields. ftext is %d33-57 / %d59-126, Any character … … 106 106 # this is the empty string. 107 107 self._partial = parts.pop() 108 #GAN 29Mar09 bugs 1555570, 1721862 Confusion at 8K boundary ending with \r: 109 # is there a \n to follow later? 110 if not self._partial and parts and parts[-1].endswith('\r'): 111 self._partial = parts.pop(-2)+parts.pop() 108 112 # parts is a list of strings, alternating between the line contents 109 113 # and the eol character(s). Gather up a list of lines after … … 213 217 self._parse_headers(headers) 214 218 # Headers-only parsing is a backwards compatibility hack, which was 215 # necessary in the older parser, which could throwerrors. All219 # necessary in the older parser, which could raise errors. All 216 220 # remaining lines in the input are thrown into the message body. 217 221 if self._headersonly:
Note:
See TracChangeset
for help on using the changeset viewer.