summaryrefslogtreecommitdiff
path: root/Lib/email/header.py
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2011-03-17 11:16:38 -0700
committerBrett Cannon <brett@python.org>2011-03-17 11:16:38 -0700
commiteb8cee83833830630f9d7388bd09d1fcb638b1a2 (patch)
tree651105352b4f7b17a4e747886562546082e9aaee /Lib/email/header.py
parentecc2db515202456a67e9702ed94ce19fe5b4711f (diff)
parente9ff2ef20488eb3d1e8bba04516939585f35a148 (diff)
downloadcpython-git-eb8cee83833830630f9d7388bd09d1fcb638b1a2.tar.gz
merge
Diffstat (limited to 'Lib/email/header.py')
-rw-r--r--Lib/email/header.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/email/header.py b/Lib/email/header.py
index e1716176fa..8c325145aa 100644
--- a/Lib/email/header.py
+++ b/Lib/email/header.py
@@ -47,7 +47,7 @@ ecre = re.compile(r'''
# For use with .match()
fcre = re.compile(r'[\041-\176]+:$')
-# Find a header embeded in a putative header value. Used to check for
+# Find a header embedded in a putative header value. Used to check for
# header injection attack.
_embeded_header = re.compile(r'\n[^ \t]+:')
@@ -314,7 +314,7 @@ class Header:
self._continuation_ws, splitchars)
for string, charset in self._chunks:
lines = string.splitlines()
- formatter.feed(lines[0], charset)
+ formatter.feed(lines[0] if lines else '', charset)
for line in lines[1:]:
formatter.newline()
if charset.header_encoding is not None: