[whatwg/fetch] Add support for compression dictionary transport (PR #1854)

Add processing steps for handling [HTTP Compression Dictionary Transport](https://datatracker.ietf.org/doc/draft-ietf-httpbis-compression-dictionary/) content encoding and dictionary negotiation (RFC pending publication).

This adds a processing layer between the HTTP cache and network fetch that handles most of the dictionary-based content encoding (including matching dictionaries to outgoing requests).

Additionally, it adds processing above the HTTP cache for storing the dictionaries for future use and defines the "compression-dictionary" initiator and destination (the matching HTML spec update is in-process).

Fix #1739 

- [x] At least two implementers are interested (and none opposed):
   * [Chrome](https://chromestatus.com/feature/5124977788977152)
   * [Firefox](https://github.com/WebKit/standards-positions/issues/160)
   * [Safari](https://github.com/WebKit/standards-positions/issues/160)
- [] [Tests](https://github.com/web-platform-tests/wpt) are written and can be reviewed and commented upon at:
   * https://github.com/web-platform-tests/wpt/tree/master/fetch/compression-dictionary (TODO: PR for non-tentative)
- [ ] [Implementation bugs](https://github.com/whatwg/meta/blob/main/MAINTAINERS.md#handling-pull-requests) are filed:
   * Chromium: https://crbug.com/1413922
   * Gecko: https://bugzilla.mozilla.org/show_bug.cgi?id=1882979
   * WebKit: (TODO)
   * Deno (not for CORS changes): (TODO)
- [x] [MDN issue](https://github.com/whatwg/meta/blob/main/MAINTAINERS.md#handling-pull-requests) is filed: https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Compression_dictionary_transport
- [x] The top of this comment includes a [clear commit message](https://github.com/whatwg/meta/blob/main/COMMITTING.md) to use. <!-- If you created this PR from a single commit, Github copied its message. Otherwise, you need to add a commit message yourself. -->


<!--
    This comment and the below content is programmatically generated.
    You may add a comma-separated list of anchors you'd like a
    direct link to below (e.g. #idl-serializers, #idl-sequence):

    Don't remove this comment or modify anything below this line.
    If you don't want a preview generated for this pull request,
    just replace the whole of this comment's content by "no preview"
    and remove what's below.
-->
***
<a href="https://whatpr.org/fetch/1854.html" title="Last updated on Aug 25, 2025, 8:43 PM UTC (ff60326)">Preview</a> | <a href="https://whatpr.org/fetch/1854/087351a...ff60326.html" title="Last updated on Aug 25, 2025, 8:43 PM UTC (ff60326)">Diff</a>
You can view, comment on, or merge this pull request online at:

  https://github.com/whatwg/fetch/pull/1854

-- Commit Summary --

  * Added compression-dictionary destination
  * Added processing of the use-as-dictionary response header
  * Added support for dictionary matching
  * Added "dcb" and "dcz" decoding

-- File Changes --

    M fetch.bs (137)

-- Patch Links --

https://github.com/whatwg/fetch/pull/1854.patch
https://github.com/whatwg/fetch/pull/1854.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/1854
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/fetch/pull/1854@github.com>

Received on Monday, 25 August 2025 20:43:42 UTC