[issue11492] email.header.Header doesn't fold headers at spaces if value contains '; 's

2011-04-07 Thread R. David Murray
R. David Murray added the comment: OK, it looks like the wrapping problem arises when the line contains runs of blank delimited tokens longer than maxlinelen *and* the line also contains ';'s. The line is then split at the ';' and the remaining overlong pieces are not split. I'll work on a

[issue11492] email.header.Header doesn't fold headers at spaces

2011-04-06 Thread R. David Murray
R. David Murray added the comment: You have to do an 'encode' to get the wrapped header. __str__ uses maxlinelen=None. However, there does seem to be a problem with the line wrapping algorithm revealed by your example: it is only doing a line break at the ';', not at any spaces. I will look