On Tue, Sep 06, 2011 at 04:49:44PM +0100, Eric Kow wrote:
> resolve issue2099: inline patch preview
> ---------------------------------------
> > - $$ text "Content-Type: multipart/mixed; boundary=\"=-\""
> > + $$ text "Content-Type: multipart/mixed; boundary=\"=_\""
>
> Is this the heart of the change?
No, the heart of the change is to remove the "alternative" multipart stuff, to
keep two separate attachments (the patch and the preview), instead of two
alternative views of a single attachment.
The line you quoted is necessary because "darcs apply" has the "=_" boundary
hard-coded (it does not parse MIME attachments properly), so we must manage to
end the part containing the attachment with "--=_--" for backward-compatibility
reasons.
> Out of interest, what do we do about the '=_' which could easily
> appear in the attachment body? This is not specific to your patch,
> just something I did not quite get from reading Wikipedia.
> Are we just counting on low probability here?
I think so.
Then again, we could improve darcs apply to cope with arbitrary boundaries, but
backward-compatibility prevents us from changing darcs send (we could at least
try to detect the issue and fail before sending when it happens).
Best,
--
Gabriel
|