#1079: Fix parsing of encoded words.

This is a behavior change: before this leading and trailing spaces were
stripped from ASCII parts, now they are preserved.  Without this fix we didn't
parse the examples in the RFC correctly, so I think breaking backward
compatibility here is justified.

Patch by Ralf Schlatterbeck.
This commit is contained in:
R David Murray 2012-06-02 17:56:49 -04:00
parent e11eb0f21b
commit 07ea53cb21
5 changed files with 113 additions and 19 deletions

View file

@ -166,7 +166,7 @@ def decode_header(header_str):
parts.append(v.decode(enc or 'ascii'))
else:
parts.append(v)
return ' '.join(parts)
return ''.join(parts)
def _parse_overview_fmt(lines):
"""Parse a list of string representing the response to LIST OVERVIEW.FMT