Re: [media-types] I-D Action: draft-ietf-mediaman-suffixes-00.txt

Manu Sporny <msporny@digitalbazaar.com> Fri, 18 February 2022 15:52 UTC

Return-Path: <msporny@digitalbazaar.com>
X-Original-To: media-types@ietfa.amsl.com
Delivered-To: media-types@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3A7AB3A118D for <media-types@ietfa.amsl.com>; Fri, 18 Feb 2022 07:52:03 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.612
X-Spam-Level:
X-Spam-Status: No, score=-2.612 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, NICE_REPLY_A=-0.714, RCVD_IN_DNSWL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id z-foiUIONMKv for <media-types@ietfa.amsl.com>; Fri, 18 Feb 2022 07:51:57 -0800 (PST)
Received: from mail.digitalbazaar.com (mail.digitalbazaar.com [96.89.14.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 37FD23A1153 for <media-types@ietf.org>; Fri, 18 Feb 2022 07:51:56 -0800 (PST)
Received: from [73.152.135.186] (helo=[10.4.10.95]) by mail.digitalbazaar.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from <msporny@digitalbazaar.com>) id 1nL5Y0-0004PX-5B for media-types@ietf.org; Fri, 18 Feb 2022 10:51:54 -0500
To: media-types@ietf.org
References: <163839922518.1124.7984157361303473511@ietfa.amsl.com> <CAL0qLwYCBxgZQKTx3gi=XKLvMSsuL33bvvh3+ebHysyvn-JMLg@mail.gmail.com> <b1f63558-848b-fa1c-4583-52ae50bdc18e@digitalbazaar.com> <06e74fc4-7679-0052-1e45-15d46b12715a@digitalbazaar.com> <a461d11c-3cce-4a09-038d-e7035a9649b4@it.aoyama.ac.jp>
From: Manu Sporny <msporny@digitalbazaar.com>
Message-ID: <e84f3003-8d31-f30e-2b04-27e40330dae8@digitalbazaar.com>
Date: Fri, 18 Feb 2022 10:51:51 -0500
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0
MIME-Version: 1.0
In-Reply-To: <a461d11c-3cce-4a09-038d-e7035a9649b4@it.aoyama.ac.jp>
Content-Type: text/plain; charset="utf-8"
Content-Language: en-GB
Content-Transfer-Encoding: 8bit
X-SA-Exim-Connect-IP: 73.152.135.186
X-SA-Exim-Mail-From: msporny@digitalbazaar.com
X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000)
X-SA-Exim-Scanned: Yes (on mail.digitalbazaar.com)
Archived-At: <https://mailarchive.ietf.org/arch/msg/media-types/CLwAOfuLNsExQVMFjg3wpzqACTo>
Subject: Re: [media-types] I-D Action: draft-ietf-mediaman-suffixes-00.txt
X-BeenThere: media-types@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "IANA mailing list for reviewing Media Type \(MIME Type, Content Type\) registration requests." <media-types.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/media-types>, <mailto:media-types-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/media-types/>
List-Post: <mailto:media-types@ietf.org>
List-Help: <mailto:media-types-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/media-types>, <mailto:media-types-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 18 Feb 2022 15:52:04 -0000

On 2/18/22 12:55 AM, Martin J. Dürst wrote:
> So we would say that if you see image/svg+xml+gzip, then you first gunzip
> it, then you apply XML parsing, and then you apply SVG processing. Any
> combination of these steps is okay if the result is the same.

Ok, great, that's good direction.

> I would definitely want to avoid any kind of general operation on media
> type strings except the removal of suffixes from the right. What you do
> for something ending in +gzip may be the same or close to what you do for 
> application/gzip, but there's no guarantee that this works in general.

I understand the general concern you have and I share it.

Do we have any concrete examples of some "+foo" being applied in different
ways across media types?

> Again, please don't do that, because it doesn't work in the general case.
> So it doesn't work as a mental model.

Ok, good, that approach to explaining the mental model is dead, then.

I'll rewrite the section using what you're suggesting, Martin, and see if it
resonates with people better.

> I very much agree with registering things.

Ok, so the concept of sort of structured suffix registry isn't off of the
table. I'll integrate that into the next iteration of the spec.

> I think the registry should map the +xyz suffix (as an example) to xyz 
> processing, which may be xyz parsing or un-xyz-ing or something else.

Ok, I'll play around with some language to get that effect by going through
all the "+foo"s in the current registry and see if I can map all of them to
"processing" of some kind or another.

The only thing I'm worried about there is what you alluded to above, in that
"+foo" is not applied consistently across all media types. It's something
that's going to "quietly" fail unless we have a media type registrant step
forward and point out why the general rule doesn't work for their media type.

For example, "Oh, well, when we said +xml, what we really meant was XML with
the XLink extension)".

> The definition of this processing may be done by pointing to another media 
> type, but that shouldn't be required.

Ok, yes, that makes sense.

> So we would e.g. have a registry entry similar to the following. +gzip ->
> Revert gzip compression (usually the command gunzip, similar to processing
> application/gzip)

Right... I have enough to do a revision.

Anyone else on here think this is the wrong direction? It feels sane to me.
Russ? Murray?

-- manu

-- 
Manu Sporny - https://www.linkedin.com/in/manusporny/
Founder/CEO - Digital Bazaar, Inc.
News: Digital Bazaar Announces New Case Studies (2021)
https://www.digitalbazaar.com/