summaryrefslogtreecommitdiffstats
path: root/Lib/email
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2003-03-07 23:24:34 (GMT)
committerBarry Warsaw <barry@python.org>2003-03-07 23:24:34 (GMT)
commit33975eac3d03563513388c571f0704bb17e6f38b (patch)
tree38193d205272cd25e1dd118e52023b06b3baf5d7 /Lib/email
parent28ffcef4e6c25513383535bb2d7ae1fc1e0a7c18 (diff)
downloadcpython-33975eac3d03563513388c571f0704bb17e6f38b.zip
cpython-33975eac3d03563513388c571f0704bb17e6f38b.tar.gz
cpython-33975eac3d03563513388c571f0704bb17e6f38b.tar.bz2
_split_ascii(): lstrip the individual lines in the ascii split lines,
since we'll be adding our own continuation whitespace later.
Diffstat (limited to 'Lib/email')
-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 afd815f..245ffc8 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