summaryrefslogtreecommitdiff
path: root/Lib/email/Header.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/email/Header.py')
-rw-r--r--Lib/email/Header.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/email/Header.py b/Lib/email/Header.py
index afd815fcea..245ffc8574 100644
--- a/Lib/email/Header.py
+++ b/Lib/email/Header.py
@@ -416,6 +416,9 @@ def _split_ascii(s, firstlen, restlen, continuation_ws, splitchars):
lines = []
maxlen = firstlen
for line in s.splitlines():
+ # Ignore any leading whitespace (i.e. continuation whitespace) already
+ # on the line, since we'll be adding our own.
+ line = line.lstrip()
if len(line) < maxlen:
lines.append(line)
maxlen = restlen