This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: email.header.Header folding modifies headers that include semi-colons
Type: behavior Stage: resolved
Components: email Versions: Python 2.7
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: barry, dseg, iritkatriel, r.david.murray
Priority: normal Keywords:

Created on 2015-03-31 22:26 by dseg, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (3)
msg239755 - (view) Author: Dan (dseg) Date: 2015-03-31 22:26
When adding or replacing a header with email.header.Header, folding of long lines will add a space after any semi-colon encountered in the string. 

Setting maxlinelen to something longer than the string (no folding required), no spaces are added after semi-colons.
msg239806 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2015-04-01 13:31
The header folding algorithm is...not all that smart.  There's a better one in the new policies in email in python3, which does not have this problem (it does have a few others, but the plan is to treat them as bugs and fix them :)

IMO this isn't worth fixing in Python2, but if you want to propose a patch I'll review it.
msg377144 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2020-09-19 00:02
David, if this was fixed in Python 3 as you say then this issue can be closed now.
Date User Action Args
2022-04-11 14:58:14adminsetgithub: 68021
2021-05-28 12:25:04iritkatrielsetstatus: open -> closed
resolution: out of date
stage: resolved
2020-09-19 00:02:03iritkatrielsetnosy: + iritkatriel
messages: + msg377144
2015-04-01 13:31:18r.david.murraysetmessages: + msg239806
2015-03-31 22:26:26dsegcreate