mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
#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:
parent
e11eb0f21b
commit
07ea53cb21
5 changed files with 113 additions and 19 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue