Requesting change to Accept-Encoding [was Re: Compression Dictionaries draft 04]

"Roy T. Fielding" <fielding@gbiv.com> Tue, 21 May 2024 22:39 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=ietf.org@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id AA164C1D6FD1 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 21 May 2024 15:39:27 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.848
X-Spam-Level:
X-Spam-Status: No, score=-7.848 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, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=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=w3.org header.b="FLjHL47X"; dkim=pass (2048-bit key) header.d=w3.org header.b="R4bRh6Nm"; dkim=pass (2048-bit key) header.d=gbiv.com header.b="djDp8aj3"
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 T2AbfLB8-jDa for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 21 May 2024 15:39:23 -0700 (PDT)
Received: from mab.w3.org (mab.w3.org [IPv6:2600:1f18:7d7a:2700:d091:4b25:8566:8113]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 05C81C1E0D9C for <httpbisa-archive-bis2Juki@ietf.org>; Tue, 21 May 2024 15:39:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=w3.org; s=s1; h=Subject:To:References:Message-Id:Cc:Date:In-Reply-To:From: Mime-Version:Content-Type:Reply-To; bh=0/4rJfpDB8epRD8jWlV8nj0xjTNTjw/fk/f2U4v+wAY=; b=FLjHL47Xd5WDyUm5yCD32ANOt5 fGcIZI6CuxslfvMiNYPLkJgwTGDSX9kGelpc5n+HrDEdueK6BTvhJzpnOcOEs5oKiH3HDRdS15apQ vXOR/JXhMXdX+CjqhL0sXe8z29ofGeMn0T8gZfkhIgIXp9x/juanOSq32J90llU8L+LBhV2kVqEfV OpqGxykYLfxWlUZng9SDylOyAXo4lIXKogjz4MvSIzegaRw599mO3vV1hkBabnj9NRbRMlaPlcRD8 hlcVekLgiuyKbAEOOw/yM6IFaJz0cQiUygv9xjVMHgJ9wcL27QV/oSkAg0puLC4zu5GPlbcRZpfYk pF/yZnpQ==;
Received: from lists by mab.w3.org with local (Exim 4.96) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1s9Y7j-00GBnk-2Q for ietf-http-wg-dist@listhub.w3.org; Tue, 21 May 2024 22:38:23 +0000
Resent-Date: Tue, 21 May 2024 22:38:23 +0000
Resent-Message-Id: <E1s9Y7j-00GBnk-2Q@mab.w3.org>
Received: from ip-10-0-0-144.ec2.internal ([10.0.0.144] helo=pan.w3.org) by mab.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from <fielding@gbiv.com>) id 1s9Y7h-00GBmp-2b for ietf-http-wg@listhub.w3.internal; Tue, 21 May 2024 22:38:21 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=w3.org; s=s1; h=To:References:Message-Id:Cc:Date:In-Reply-To:From:Subject: Mime-Version:Content-Type:Reply-To; bh=0/4rJfpDB8epRD8jWlV8nj0xjTNTjw/fk/f2U4v+wAY=; t=1716331101; x=1717195101; b=R4bRh6NmdkZYnjQB2uLkkDfOCqHnPZrffuYx4abKHW7/ivTqPoafOsOtRUIsTPZCQR2GvYN/LWK /Det6B1RYaWkp6e2rCu/MVqEkuxV+RYxfpF7Q+tgKt3YMOlLCrAOM2FnGcw/r4a0lCDL5IhHZpxrq 6pcy7C99hTVpFz0DTIDOt3vgfWs6dOK6GsFKPoJuFRNpNbnlcTlLFzfnGeNqv2YPnpzK/l1mMSKeo bSSxQAFFETjlFd2VVohF41B6WkGDRWO10umOcAhzVe6c01IkLCTNA9mY4Z6/vPivHDCBBKb24re52 y/BYuTSIwlfYHaDlq9QRdCIi27DiCggX+gEw==;
Received-SPF: pass (pan.w3.org: domain of gbiv.com designates 23.83.209.27 as permitted sender) client-ip=23.83.209.27; envelope-from=fielding@gbiv.com; helo=butterfly.birch.relay.mailchannels.net;
Received: from butterfly.birch.relay.mailchannels.net ([23.83.209.27]) by pan.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from <fielding@gbiv.com>) id 1s9Y7g-006UjC-2L for ietf-http-wg@w3.org; Tue, 21 May 2024 22:38:21 +0000
X-Sender-Id: dreamhost|x-authsender|fielding@gbiv.com
Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 3687CC1FDE; Tue, 21 May 2024 22:38:14 +0000 (UTC)
Received: from pdx1-sub0-mail-a231.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id A69C9C2027; Tue, 21 May 2024 22:38:13 +0000 (UTC)
ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1716331093; a=rsa-sha256; cv=none; b=KAKx0Rb+aub57fcrr1bCat/RtF5ylX3JQ3feZru+O8ei19fUAH7OhLaE4tRNNWeIZWl7DV vphGBD9Tw9oiKZ0mOk6Ucqa5TUo44p+vHIAT7f3sJYE51kqj4N87S8blJiqS0UtV64ELR3 6hynpV8hDgXOl9ckb2gmO64ThVq4M4FHCmzgIs9wDORoOL6/BTqFen5LPJamBDNPvAtko1 Z5KFpx00oDpFUQEWI9H2ZNB4QXBJoh6aoY5nazg8fKx7aNfRujP1zxrBnypQjoVLAn7b0+ ad6xaw8DBoONJ76W84AJK2GF/HJ3Iu5/n5V/v0HM36XyWXJAZLWold2lhyNhmA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1716331093; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=/qZjpg9b/nkgCf+6g3BjWsvLh7qdtashMY+KcuS5l/o=; b=9DII5uuHMR7qbzupNh804RE6RCn3AtxI8Q6jq3s4g5icYL5GNTaxQY2H5rLG2jw5uxit/h bgOejSr9HqELQ+lxZjhydcCVl6ouJzATrLdaeWIrt4zPWFjIXVAhvuh7VL5d80lC0Mv4I9 LbpIU9F523MTFXqPuhGiJ7JhD+UXn2Bf8Ak6Hbnkh1Wdj5oBXw/O339ug+EWXOb3p8z9pb G890kiHx+ylvfSbdf15pomS6tWksTl8OKlN5eTR0qH7rHu6is5JCSURcVb+YY63qTqR68S FVIKZWsXhoTVNqtpv6q1ErIS0y9/6M5gTmSovucCMOG/2jRgFF6d+d2gVXr8wg==
ARC-Authentication-Results: i=1; rspamd-68bbddc7f5-2phpv; auth=pass smtp.auth=dreamhost smtp.mailfrom=fielding@gbiv.com
X-Sender-Id: dreamhost|x-authsender|fielding@gbiv.com
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|fielding@gbiv.com
X-MailChannels-Auth-Id: dreamhost
X-Spill-Attack: 54e269d54402351e_1716331093916_3762785320
X-MC-Loop-Signature: 1716331093915:480566750
X-MC-Ingress-Time: 1716331093915
Received: from pdx1-sub0-mail-a231.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.122.38.57 (trex/6.9.2); Tue, 21 May 2024 22:38:13 +0000
Received: from smtpclient.apple (ip72-194-73-53.oc.oc.cox.net [72.194.73.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: fielding@gbiv.com) by pdx1-sub0-mail-a231.dreamhost.com (Postfix) with ESMTPSA id 4VkTq92Dllz7K; Tue, 21 May 2024 15:38:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gbiv.com; s=dreamhost; t=1716331093; bh=0/4rJfpDB8epRD8jWlV8nj0xjTNTjw/fk/f2U4v+wAY=; h=Content-Type:Subject:From:Date:Cc:Content-Transfer-Encoding:To; b=djDp8aj3zKUi993dQqR+8stZytF6J1Jp/VTI8QXe4oVeayf3iVTeKY/RZJhcRU1jA QqZfp9X0TnsvnFWpFI3WSXqJLC/2DhBWqPIgR66XgqAkXQGiGNJulbRymH/5UCsGXV i3eY7YUedbYbwrjqEABjzglvrYjGdTZpWxST92EkzEeHks4qInjX8qOkIMTmcS6+Yh CeQfUHIPsoJsQRV8bZgL8K8oF9btYI4qx6FbU01BS8P7m8sIx1W1syZgVyfyQ30lYk GtqThYtVYxsBowOTs3IY7yO91lt1c2XGpGFSWiQurBEA099WKgZGn3SfMgHU0Qw831 BZZDfQFSdczeg==
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\))
From: "Roy T. Fielding" <fielding@gbiv.com>
In-Reply-To: <CAJV+MGwvDCxS6D0Cxi=oGYwpXH1N7RJ9wwDRwj8Lieotz315Ag@mail.gmail.com>
Date: Tue, 21 May 2024 15:38:02 -0700
Cc: HTTP Working Group <ietf-http-wg@w3.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <6E4C10C3-C3BA-43FD-96AA-5EECE2B2BB13@gbiv.com>
References: <CAJV+MGwvDCxS6D0Cxi=oGYwpXH1N7RJ9wwDRwj8Lieotz315Ag@mail.gmail.com>
To: Patrick Meenan <patmeenan@gmail.com>
X-Mailer: Apple Mail (2.3774.600.62)
X-W3C-Hub-DKIM-Status: validation passed: (address=fielding@gbiv.com domain=gbiv.com), signature is good
X-W3C-Hub-Spam-Status: No, score=-6.1
X-W3C-Hub-Spam-Report: ARC_SIGNED=0.001, ARC_VALID=0.001, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, DMARC_MISSING=0.001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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, W3C_AA=-1, W3C_DB=-1, W3C_IRA=-1, W3C_WL=-1
X-W3C-Scan-Sig: pan.w3.org 1s9Y7g-006UjC-2L d6665796102456e9b057fadf40b83bdd
X-Original-To: ietf-http-wg@w3.org
Subject: Requesting change to Accept-Encoding [was Re: Compression Dictionaries draft 04]
Archived-At: <https://www.w3.org/mid/6E4C10C3-C3BA-43FD-96AA-5EECE2B2BB13@gbiv.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/51956
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <https://www.w3.org/email/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

> On May 20, 2024, at 7:49 AM, Patrick Meenan <patmeenan@gmail.com> wrote:
> 
> FYI, draft 04 of the compression dictionaries spec was just released: https://datatracker.ietf.org/doc/draft-ietf-httpbis-compression-dictionary/
> 
> The changes since draft 03 are:
> 
> - Added link relation ("compression-dictionary")
> - Moved the dictionary hash into the response payload and removed the "Compression-Dictionary" response header
> - Changed content-encodings to "dcb" and "dcz"
> - Specified the compression window settings for Zstandard and Brotli
> 
> We're converging on a final spec and the Chrome origin trials to-date have been extremely positive.
> 
> There is one remaining discussion topic that I'm aware of which is around the compression algorithms that we spec and if we should collapse to a single algorithm and manage fragmentation at the spec level: https://github.com/httpwg/http-extensions/issues/2756
> 
> If you're aware of any other issues or have concerns with something else in the spec, please let us know. Otherwise we're hoping to come to an agreement on the compression algorithms and then move towards last call and RFC.


A server can send Use-As-Dictionary when applicable to any response,
regardless of Accept-Encoding or user agent. This allows the original
200 response to be delivered without unnecessary Vary, and by edge
caches that might have no knowledge of dictionaries. That's great.

However, I would like to change the protocol in 6.1 (Accept-Encoding)
to require the following:

 o When (and only when) a client has a stored dictionary that
   matches a request, it can send Available-Dictionary and
   Accept-Encoding with its dictionary-compression encodings.

 o When a client does not have a stored dictionary that matches
   the request, or chooses not to use one for the request,
   the client MUST NOT send its dictionary-compression
   algorithms in Accept-Encoding.

IOW, I would require that clients not advertise their implemented
dictionary-compression encodings in Accept-Encoding for requests
that do not desire a dictionary-compression response, since such
unnecessary variance in HTTP can have a critical impact on caching.
This is consistent with the semantics of Accept-Encoding.

This change would allow dictionary-based compression to be deployed
for existing resources and existing CDNs without causing a
factorial expansion of Vary. IOW, it allows dictionary-compression
to be deployed without impacting the cacheability of resources
for non-dictionary-using clients.

The one negative is that it lessens the ability to detect when
dictionary-compression is usable before a dictionary is provided.
I am pretty sure we don't need that.

A 200 response that has been dictionary-compressed would, of course,
still be marked with "Vary: Accept-Encoding, Available-Dictionary"
and the chosen encoding given in "Content-Encoding". This would
not be affected by the above change.

The possibility of multiple cached responses for a given response,
each with its own Vary from its original request, is already defined
by HTTP caching. I doubt that everyone implements it correctly,
but that's not unusual. There's no other correct choice given how
origin servers select negotiable content.

Cheers,

....Roy T. Fielding, Senior Principal Scientist, Adobe