From 6613fb8412ce9551875c200af77d4c41f6911772 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Mon, 17 Mar 2003 20:36:20 +0000 Subject: _encode_chunks(): Throw out empty chunks. --- Lib/email/Header.py | 2 ++ 1 file changed, 2 insertions(+) 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: -- cgit v0.12