Kaydet (Commit) c29db265 authored tarafından Barry Warsaw's avatar Barry Warsaw

_parse_headers(): Strip a trailing newline from the envelope header. Closes

SF #951088.
üst 6f3b0337
......@@ -404,6 +404,10 @@ class FeedParser:
# Check for envelope header, i.e. unix-from
if line.startswith('From '):
if lineno == 0:
# Strip off the trailing newline
mo = NLCRE_eol.search(line)
if mo:
line = line[:-len(mo.group(0))]
self._cur.set_unixfrom(line)
continue
elif lineno == len(lines) - 1:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment