[issue43493] EmailMessage mis-folding headers of a certain length

2021-03-17 Thread Mike Glover
Mike Glover added the comment: Further research shows that email.parser.Parser is not handling the affected lines correctly -- the leading '\n ' is not being stripped from the header value. Attached is the (ugly, worksforme) function I'm using to workaround this problem -

[issue43493] EmailMessage mis-folding headers of a certain length

2021-03-14 Thread Mike Glover
New submission from Mike Glover : The attached file demonstrates the incorrect folding behavior I'm seeing. Header lines of a certain total length get folded after the colon following the header name, which is not valid RFC. Slightly longer or shorter lines are folded corr