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
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