Re: [ietf-types] Status of application/patch or text/patch?

Julian Reschke <julian.reschke@gmx.de> Fri, 20 July 2012 11:16 UTC

Return-Path: <julian.reschke@gmx.de>
X-Original-To: ietf-types@ietfa.amsl.com
Delivered-To: ietf-types@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 0F9B021F855B for <ietf-types@ietfa.amsl.com>; Fri, 20 Jul 2012 04:16:21 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.346
X-Spam-Level:
X-Spam-Status: No, score=-104.346 tagged_above=-999 required=5 tests=[AWL=-1.747, BAYES_00=-2.599, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cUddrr0UYCWA for <ietf-types@ietfa.amsl.com>; Fri, 20 Jul 2012 04:16:20 -0700 (PDT)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by ietfa.amsl.com (Postfix) with SMTP id 20B8921F84C4 for <ietf-types@ietf.org>; Fri, 20 Jul 2012 04:16:17 -0700 (PDT)
Received: (qmail invoked by alias); 20 Jul 2012 11:17:12 -0000
Received: from mail.greenbytes.de (EHLO [192.168.1.140]) [217.91.35.233] by mail.gmx.net (mp034) with SMTP; 20 Jul 2012 13:17:12 +0200
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX1+WEEpDd0WWaLI8ZqdRuaP9Zc7bbq+1wXYVd85mk7 cQBG3FVLycexOM
Message-ID: <50093E36.1000107@gmx.de>
Date: Fri, 20 Jul 2012 13:17:10 +0200
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0
MIME-Version: 1.0
To: Simon Josefsson <simon@josefsson.org>
References: <CAMHjJ=Sr+pVyqSCZeJw5ECjWHjSpeu1+womAxeAO6VQCv8aT6g@mail.gmail.com> <87k3y03q69.fsf@latte.josefsson.org> <50086D95.7080004@gmx.de> <87txx2yay1.fsf@latte.josefsson.org>
In-Reply-To: <87txx2yay1.fsf@latte.josefsson.org>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
Cc: ietf-types@ietf.org
Subject: Re: [ietf-types] Status of application/patch or text/patch?
X-BeenThere: ietf-types@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: "Media \(MIME\) type review" <ietf-types.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ietf-types>, <mailto:ietf-types-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/ietf-types>
List-Post: <mailto:ietf-types@ietf.org>
List-Help: <mailto:ietf-types-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ietf-types>, <mailto:ietf-types-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 20 Jul 2012 11:16:21 -0000

On 2012-07-20 12:38, Simon Josefsson wrote:
> ...
> Some reasons that I had in mind were:
>
> * There is no character set issues -- the encoder doesn't need to know
>    which character encoding was used.  The specification doesn't have to
>    talk about character sets (which makes up a big chunk of the current
>    spec.)
> ...

The encoder needs to be aware of lines, which implies that it knows that 
octet sequence(s) are line endings.

> * It can deal with diff's of files with different character sets,
>    e.g. converting ISO-8859-1 files to UTF-8.  Like the draft says now,
>    the text/* approach is unable to deal with this.

I don't see that the problem is.

 From a media type of view, the patch consists on instructions how to 
patch certain lines in a text file. So to make this work properly, the 
encoding of both the patch and the file-to-be-patched need to be known, 
but they don't need to be the same.

> * Sometimes text/* parts are modified by gateways, and this is usually
>    avoided by using an application/* type.  So the spec doesn't have to
>    talk about these concerns.

If a gateway every changed the charset, it would need to do it properly. 
Otherwise it's broken anyway (and I would be surprised if it handled 
PATCH properly).

> However I support doing both media types.  For some situations,
> text/patch is appropriate.
>
> /Simon

Best regards, Julian