summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2003-03-17 20:36:20 (GMT)
committerBarry Warsaw <barry@python.org>2003-03-17 20:36:20 (GMT)
commit6613fb8412ce9551875c200af77d4c41f6911772 (patch)
tree3f986932595dca83c77826613018de246352d58d
parent240754933e9c93eb5d4e99184d9167451ae45e16 (diff)
downloadcpython-6613fb8412ce9551875c200af77d4c41f6911772.zip
cpython-6613fb8412ce9551875c200af77d4c41f6911772.tar.gz
cpython-6613fb8412ce9551875c200af77d4c41f6911772.tar.bz2
_encode_chunks(): Throw out empty chunks.
-rw-r--r--Lib/email/Header.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/email/Header.py b/Lib/email/Header.py
index 66a18c8..624e7c4 100644
--- a/Lib/email/Header.py
+++ b/Lib/email/Header.py
@@ -361,6 +361,8 @@ class Header:
# =?charset2?b?SvxyZ2VuIEL2aW5n?="
chunks = []
for header, charset in newchunks:
+ if not header:
+ continue
if charset is None or charset.header_encoding is None:
s = header
else: