commit | ef5bb25e2d6147cd44be9c9b166525fb30485be0 | [log] [tgz] |
---|---|---|
author | Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com> | Thu May 23 04:13:16 2019 +0300 |
committer | R. David Murray <rdmurray@bitdance.com> | Wed May 22 21:13:16 2019 -0400 |
tree | 34b3fa59b4861461fab7223207c8605b75e88ec6 | |
parent | 6bc5917903b722bdd0e5d3020949f26fec5dfe9a [diff] [blame] |
bpo-27737: Allow whitespace only headers encoding (#13478)
diff --git a/Lib/email/header.py b/Lib/email/header.py index 7b30a03..4ab0032 100644 --- a/Lib/email/header.py +++ b/Lib/email/header.py
@@ -431,7 +431,7 @@ if end_of_line != (' ', ''): self._current_line.push(*end_of_line) if len(self._current_line) > 0: - if self._current_line.is_onlyws(): + if self._current_line.is_onlyws() and self._lines: self._lines[-1] += str(self._current_line) else: self._lines.append(str(self._current_line))