patchbomb (python email module?) breaks lines after 990 chars
Christian Ebert
blacktrash at gmx.net
Mon Apr 20 20:22:44 UTC 2009
* Martin Geisler on Monday, April 20, 2009 at 21:56:38 +0200
> Christian Ebert <blacktrash at gmx.net> writes:
>> * Martin Geisler on Monday, April 20, 2009 at 21:15:12 +0200
>>> Christian Ebert <blacktrash at gmx.org> writes:
>>>> Further testing reveals, it's not Mutt (and not Mailman either), it's
>>>> either patchbomb (I've tested as far back as Mercurial 1.0.2) or
>>>> python's email module. Lines are broken after 990 chars ...
>>>
>>> That is part of RFC 2822:
>>>
>>> 2.1.1. Line Length Limits
>>>
>>> There are two limits that this standard places on the number of
>>> characters in a line. Each line of characters MUST be no more than
>>> 998 characters, and SHOULD be no more than 78 characters, excluding
>>> the CRLF.
>>>
>>> [...]
>>
>> Ah, thanks for the research ... sorry, I guess you knew that by
>> heart ;-)
>
> Nope, I'm afraid not :-) But I thought it was strange that it broke just
> before 1000 characters, so I guessed it was done on purpose.
>
> I tried looking at patchbomb and it seems to me that we are not encoding
> the patches using base64
unless they are utf-8 (utf-8 only)
> or quoted-printable -- this is only done for
> attached bundles. Maybe we should encode the body as well?
See Dirkjan's reply. And would -- going towards worst case
scenario -- patches that mix e.g. utf-8 with some 8-bit encoding
be handled correctly? I forgot, too long ago already since
implementing email.charsets made knots in my brain.
c
--
Was heißt hier Dogma, ich bin Underdogma!
[ What the hell do you mean dogma, I am underdogma. ]
_F R E E_ _V I D E O S_ http://www.blacktrash.org/underdogma/
http://www.blacktrash.org/underdogma/index-en.html
More information about the Mercurial-devel
mailing list