Add support for a server-provided dictionary ID#2687
Merged
pmeenan merged 1 commit intohttpwg:mainfrom Nov 27, 2023
Merged
Conversation
Contributor
Author
|
@vkrasnov could you please take a look and see if this meets your needs and looks reasonable? |
|
Yes, looks great! Thanks! |
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}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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