Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Response should include dictionary used for encoding - raised by Martin Thomson #2636

Closed
pmeenan opened this issue Sep 20, 2023 · 2 comments
Closed

Comments

@pmeenan
Copy link
Contributor

pmeenan commented Sep 20, 2023

I don't understand how a client determines which dictionary was used by the server. It seems like the response depends on the request, which is fragile (and doesn't allow clients to advertise multiple dictionaries, which seems likely with Use-As-Dictionary as it is).

Original listserv response
cc @martinthomson

Moved from private ID issue #3

@pmeenan
Copy link
Contributor Author

pmeenan commented Sep 20, 2023

For identifying the dictionary, it's worth noting that the spec requires that the client advertise a SINGLE dictionary that it supports but yes, the response depends on the dictionary identified in the request. This also helps with minimizing the variants that caches would need to store since the response needs to be varied on the request's available dictionary (and multiple would explode the permutations). It wouldn't hurt to echo the dictionary hash in the response which would allow for other mechanisms of advertising dictionaries but that also carries the cost of complicating the vary logic (would need to vary based on whatever request header was used to negotiate the dictionary that ended up being used).

Listserv response

@pmeenan pmeenan self-assigned this Sep 20, 2023
pmeenan added a commit to pmeenan/http-extensions that referenced this issue Nov 10, 2023
Adds a new "Content-Dictionary" with the hash of the dictionary used when encoding the HTTP response.

For #httpwg#2636
@pmeenan
Copy link
Contributor Author

pmeenan commented Nov 20, 2023

Dictionary hash used is now in the response headers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant