Re: [media-types] Thoughts on suffixes, single and multiple

Mark Nottingham <mnot@mnot.net> Wed, 17 April 2024 03:42 UTC

Return-Path: <mnot@mnot.net>
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 866E1C14F60B for <media-types@ietfa.amsl.com>; Tue, 16 Apr 2024 20:42:10 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.096
X-Spam-Level:
X-Spam-Status: No, score=-2.096 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=mnot.net header.b="cR2fXh0N"; dkim=pass (2048-bit key) header.d=messagingengine.com header.b="FfhYDOsZ"
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id C18-yF4ystPz for <media-types@ietfa.amsl.com>; Tue, 16 Apr 2024 20:42:05 -0700 (PDT)
Received: from wfhigh5-smtp.messagingengine.com (wfhigh5-smtp.messagingengine.com [64.147.123.156]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 57B8BC14F60A for <media-types@ietf.org>; Tue, 16 Apr 2024 20:42:05 -0700 (PDT)
Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfhigh.west.internal (Postfix) with ESMTP id F1C9B1800082; Tue, 16 Apr 2024 23:42:03 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 16 Apr 2024 23:42:04 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mnot.net; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1713325323; x=1713411723; bh=XsWqOSbdczn4injcLklmtsm0X51SAZMTqyjEj1/HHXE=; b= cR2fXh0NaC2wEy/M2cCdnSyIPR8TENGNoxI4rwSeyjNoXvhRu+luwjIFEFcPjey8 kg7MRIILDA9eUaSpgl7dxIbZrBrxu7blW/WAQdf0m5PA5ZFyaTFRNn2Vl9iiaynO CKezMeDtA9KX7it9oZ3sXqi23nnkqyMZjDoO2l+E63mTvl+A+NAwpeY/uQiSllWG 3/DXVzg51JExbjXwo+vhhDfZwbTpwN6G/5tsvmXSt5IbTB3sL+fW1/jcbuwLGs/n UehLqw26L6NDIjHhdBHTGRCbnyAdsOq4Gk14ZKHG7HzAdEjntUNpnoY2pr2stfwK 6zgKxNOU/Mw94yrLV/1DgA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1713325323; x= 1713411723; bh=XsWqOSbdczn4injcLklmtsm0X51SAZMTqyjEj1/HHXE=; b=F fhYDOsZgydIZ5TBS6Sp86ZyT1PE6effORFZCS+SMorEzL1HtYvOX+vh2AqkTl/td w1ZoO+BfHmyoLRYxQHVwGZeweRkE0yRtJm9MbgBH7xSmO6IMxAksAISYa+lE+IO1 aJ0yJ5UgWdQK6xxcrgyIjOkJmexCRLhhUYY1fOZzsLsRGkyeuBfHY6nnO49TCJHU Oc5MsJRHOU0Qh1BDgvK7HaIdjSScAm5F3w0w4J+CQKjkK1BCdo239G6e83UtdUHR C1dcvz1DFDRw8+23AFC1gJ6esEbopWO9/ApzDaLvJS0/4Me8Xfn6aHYPc+hhnCA8 J5nM0F0yMqpmA4L5UXjSg==
X-ME-Sender: <xms:C0UfZhztkOPeG7swwNghwX2t66burIsIoZJtIAVNEZb-jWPmyGuCOQ> <xme:C0UfZhQ5gj_78cNeAC77PEPsgdzV-j9ZTx7ahF0xTwA3w7ANlsSekXwPePY3bOBwb FFruV_x-M__9d7E1Q>
X-ME-Received: <xmr:C0UfZrWdivf34aT-8B8BwwarBGuOKV-VhTdGjPU5uwEjugMNCSscPVBuvWgI6sHezqT1ZdS1Q7M6tB4LqmlxA6H4nHH2crh6CHifNuQT81fsqWK6LEOQdgVe>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudejjedgieeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurheptggguffhjgffvefgkfhfvffosehtqhhmtdhhtdejnecuhfhrohhmpeforghr khcupfhothhtihhnghhhrghmuceomhhnohhtsehmnhhothdrnhgvtheqnecuggftrfgrth htvghrnheptddvfeduuddukefhteetveeggfevheejveelffevgeekgeevjeevtdeugefh uefgnecuffhomhgrihhnpeiffedrohhrghdpmhhoiihilhhlrgdrohhrghdpihgvthhfrd horhhgpdhmnhhothdrnhgvthenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhep mhgrihhlfhhrohhmpehmnhhothesmhhnohhtrdhnvght
X-ME-Proxy: <xmx:C0UfZjgwdY3n2Kfe8hyCHyPyZ4ydkSzUlONugHvs4n-HmPjQaTfCTg> <xmx:C0UfZjCcG8SIG5EArBri7Qfd9Dvx_Wqqdnqcfj-ovGCoDMJyQb7k1A> <xmx:C0UfZsI8O2sEYaPK2Svjw_1w42jfa7W5RGXPaIXJLGdHdkqSZ7SlIg> <xmx:C0UfZiC8RJK2kh5RzdFu2EbTpPqRk59OZllBTUOCCm5G8CZlC_4NRg> <xmx:C0UfZu-uRfFtMgFrfnUM1HgrKwZHOYReCi8WxoCKYB3_g6s1x91BFsP2>
Feedback-ID: ie6694242:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 16 Apr 2024 23:42:01 -0400 (EDT)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.500.171.1.1\))
From: Mark Nottingham <mnot@mnot.net>
In-Reply-To: <CAN8C-_LADKECL2swf=BsMG1k1bpTLKRc4b_h_guTxdA59bMOnA@mail.gmail.com>
Date: Wed, 17 Apr 2024 13:41:58 +1000
Cc: Darrel Miller <darrel@tavis.ca>, IETF Media Types <media-types@ietf.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <4E2C432A-7766-4D26-9F58-CA2915631434@mnot.net>
References: <SJ2PR01MB8102985A55F6AFCD88859FD7A30F2@SJ2PR01MB8102.prod.exchangelabs.com> <CAN8C-_LADKECL2swf=BsMG1k1bpTLKRc4b_h_guTxdA59bMOnA@mail.gmail.com>
To: Orie Steele <orie@transmute.industries>
X-Mailer: Apple Mail (2.3774.500.171.1.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/media-types/sL6H7e61ywskxVrbAG3mCnuJroU>
Subject: Re: [media-types] Thoughts on suffixes, single and multiple
X-BeenThere: media-types@ietf.org
X-Mailman-Version: 2.1.39
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: Wed, 17 Apr 2024 03:42:10 -0000

The issue that I've heard about is that parameters are dropped in some contexts, meaning they can't always be relied upon.


> On 17 Apr 2024, at 13:35, Orie Steele <orie@transmute.industries> wrote:
> 
> (as an individual / media type complexity enthusiast)
> 
> Parameters were discussed in the W3C VCWG and I think on this list previously as potential alternatives, including some syntax proposed by Ted and Joe from W3C that looks very similar to what you suggest.
> 
> The main argument against parameters is that you then have more complicated parsing instead of simple string matching, and more error cases to consider... In other words, worse interoperability, because of too many alternative expressions of the same media type.
> 
> For an example that uses both suffixes and parameters, see:
> 
> https://www.w3.org/TR/activitystreams-core/#media-type
> 
> application/ld+json; profile="https://www.w3.org/ns/activitystreams"
> 
> This could have just been:
> 
> application/activity-streams
> 
> If that had been the choice and then later a CBOR encoding and a new profile were needed, a suffix and a parameter could be added, when they are needed, instead of anticipated in the initial registration.
> 
> Starting with a fully suffixed and parameterized media type, seems to anticipate the success of the base and a need for alternative expressions of it.
> 
> As a general rule, I would avoid parameters and suffixes, unless you have a lot of evidence that they are necessary... Since once they are present you have lost the opportunity for a simple and easy to match against media type.
> 
> Perhaps the convention of signaling suffixes has escaped for long enough to memorialize it as a trend with advantages and disadvantages, but I don't think we've seen near that amount of success for heavily parameterized media types, except perhaps in AV codecs.
> 
> 
> For example: https://developer.mozilla.org/en-US/docs/Web/Media/Formats/codecs_parameter
> 
> Regards,
> 
> OS
> 
> On Tue, Apr 16, 2024, 10:02 PM Darrel Miller <darrel@tavis.ca> wrote:
> As a follow up to the tests that I did to see if any of the major browsers respect +json, which they didn't, I tried the same experiment with +xml and got the same results.  None of the browsers I tried, used the +xml suffix to cause XML rendering.
> 
> This leads me to feel like that we are debating over what is theoretically possible, but in the 23 years since suffixes were formalized, that theoretical value has not been widely realized. We do not have a clear guidance on what the suffix means.  For example,  +json and +gzip are achieving quite distinct goals. We have seen that introducing multiple suffixes has raised a range of new concerns that we do not have clear answers for.
> 
> Most of the proposed uses of single and multiple suffixes that I have seen are either trying provide an encoding format that overlaps with Content-Encoding, or they are being used as a indicator to client or server of the specific format of some content where multiple contents are supported.
> 
> An example of the latter scenario is what we have been trying to do with the registration of the media type for OpenAPI descriptions https://www.ietf.org/archive/id/draft-ietf-httpapi-rest-api-mediatypes-05.html#section-2.1
> 
> The proposal is to register application/openapi+yaml and application/openapi+json.  This allows clients to conneg the format they desire and servers to advertise the format they are returning.
> 
> However, upon reflection of all this conversation around suffixes, my question is why not do this?
> 
> application/openapi;format=yaml
> application/openapi;format=json
> 
> By defining an optional format parameter for the media type, we only have to have one registration, we get the same value and a client has the option to omit the format if either is supported.
> 
> John Klensin made the comment in one of the recent IETF mediaman meetings that parameters for media types were created to prevent there being an explosion of media type registrations.
> 
> Is there a reason why media type parameters cannot be used in many of these other use cases that are currently struggle to shoehorn information into suffixes?
> 
> e.g.
> application/vc;format=jsonld
> application/did;format=jsonld
> application/voucher;format=json;sig=jose
> application/voucher;format=cbor;sig=cose
> 
> 
> I think suffixes were an experiment into encoding some meaning into part of a media type name that did not produce the desired results. I don't believe that if we decided to remove that meaning that anything on the internet will break.  Existing suffixes can remain, but I think moving forward we should be looking towards leveraging parameters, not suffixes for capturing meta information about media types.
> 
> Darrel
> _______________________________________________
> media-types mailing list
> media-types@ietf.org
> https://www.ietf.org/mailman/listinfo/media-types
> _______________________________________________
> media-types mailing list
> media-types@ietf.org
> https://www.ietf.org/mailman/listinfo/media-types

--
Mark Nottingham   https://www.mnot.net/