Re: [RFC][PATCH] update SubmittingPatches to clarify attachmentpolicy

From: Krzysztof Halasa
Date: Wed May 04 2005 - 13:54:06 EST


Dave Hansen <haveblue@xxxxxxxxxx> writes:

> +Many maintainers will now accept patches submitted to them as
> +text/plain attachments. Many mailers quote these attachements in the
> +same way that they do for inline patches. But, some maintainers still
> +prefer inlines and they are certainly the safest bet.

There is MIME "Content-Disposition: inline".
Personally I think it's at least as good as plain text - it's MIME
attachment (you can extract automatically, you have well-defined patch
boundaries, original file name etc.) _and_ mail readers are supposed to
(and do) display such attachments as normal message parts.

The message is readable with MIME-unaware readers (scripts etc.) as well.

Such attachment (raw message data) looks like:

From: xxx@yyy
To: lkml
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
--=-=-=

Normal message text etc.

--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline; filename=xxx.patch

--- linux-2.6/xxx.c 25 May 2003 22:13:37
+++ linux-2.6/xxx.c 25 May 2003 22:13:38
the rest of patch text

--=-=-=--

> +code. If you must use an attachment,

Nearly no one "must" use attachments. I can only think of people using
broken mail servers ("corporate servers").

> verify that it has no
> +Content-Type-Encoding.

Content-Transfer-Encoding.

I'd say "verify that it's binary-encoded - quoted-printable and base64
encodings are not permitted".

I.e., it's perfectly fine to specify "Content-Transfer-Encoding: 7bit"
(or "8bit" or possibly "binary", though I don't exactly know the
difference between "8bit" and "binary").

> A MIME attachment also takes Linus a bit more
> +time to process, decreasing the likelihood of your MIME-attached
> +change being accepted.

I don't think so. Badly formatted MIME attachments, sure. I'd be
surprised if Linus applies them at all.

> Exception: If your mailer is mangling patches then someone may ask
> -you to re-send them using MIME.
> +you to re-send them compressed or using other MIME encodings.

Rather: "... someone may ask you to re-send them as properly encoded
MIME attachments".


In fact I'd encourage using binary-encoded inlined MIME attachments
at all times, with non-MIME 7bit or 8bit plain text being accepted
as secondary format.
--
Krzysztof Halasa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/