From: Barry Warsaw Date: Fri, 7 Mar 2003 23:24:34 +0000 (+0000) Subject: _split_ascii(): lstrip the individual lines in the ascii split lines, X-Git-Tag: v2.3c1~1522 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=33975eac3d03563513388c571f0704bb17e6f38b;p=thirdparty%2FPython%2Fcpython.git _split_ascii(): lstrip the individual lines in the ascii split lines, since we'll be adding our own continuation whitespace later. --- diff --git a/Lib/email/Header.py b/Lib/email/Header.py index afd815fcea41..245ffc8574b1 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