Skip to content

Add support for a server-provided dictionary ID#2687

Merged
pmeenan merged 1 commit intohttpwg:mainfrom
pmeenan:id
Nov 27, 2023
Merged

Add support for a server-provided dictionary ID#2687
pmeenan merged 1 commit intohttpwg:mainfrom
pmeenan:id

Conversation

@pmeenan
Copy link
Copy Markdown
Contributor

@pmeenan pmeenan commented Nov 27, 2023

This adds support for a server-provided sf-string "id" of up to 1024 characters that is echoed back in a "Dictionary-ID" request header when the dictionary is advertised as being available.

This allows for a server to use something other than the hash to retrieve the dictionary (i.e. a cache key). This should be more flexible than the client sending the original request URL and will allow for servers to store arbitrary context information with the dictionary.

It doesn't open up any additional privacy or security concerns because the dictionary hash was already being treated as if it was user-identifiable information.

For #2633

@pmeenan
Copy link
Copy Markdown
Contributor Author

pmeenan commented Nov 27, 2023

@vkrasnov could you please take a look and see if this meets your needs and looks reasonable?

@vkrasnov
Copy link
Copy Markdown

Yes, looks great! Thanks!

@pmeenan pmeenan merged commit 746d1aa into httpwg:main Nov 27, 2023
@pmeenan pmeenan deleted the id branch November 27, 2023 15:55
aarongable pushed a commit to chromium/chromium that referenced this pull request Feb 7, 2024
A new "id" option of "Use-As-Dictionary" header was specified by the
spec [1]. The "id" option is parsed by `ParseDictionaryHeaderInfo()`
method when V2 backend is enabled after [2].

This CL changes SharedDictionaryNetworkTransaction to set
"Dictionary-ID" header with the dictionary ID when the dictionary is
usable and the ID is not empty.

[1]: httpwg/http-extensions#2687
[2]: https://crrev.com/c/5248489

Bug: 1413922
Change-Id: I15b8663d56992dc1bb61423c7c9317586593538c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5271304
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: Patrick Meenan <pmeenan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1257108}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants