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

Treat de/compression asymmetrically in H2 #704

Open
KingMob opened this issue Dec 22, 2023 · 0 comments
Open

Treat de/compression asymmetrically in H2 #704

KingMob opened this issue Dec 22, 2023 · 0 comments

Comments

@KingMob
Copy link
Collaborator

KingMob commented Dec 22, 2023

About

Because the H2 code has better reuse between server and client, turning on compression currently enables compression, decompression, and negotiation in both directions. However, they are fundamentally asymmetrical, and the defaults should reflect that.

The server should not default to decompressing requests, for both pragmatic and security reasons. Explicit support should be fine, though. Likewise, the client should not default to compressing requests.

Earlier conversation

The h2-compression-handler is about parsing the client's "accept-encoding" header to determine what encoding to return. In theory, this could be symmetrical, and clients could encode their bodies, but for pragmatic and security reasons, client request body encoding isn't a thing, and we should change the code to make it clearer that it's server-only, and prevent misuse. (E.g., rename the keys, update AlephHttp2FrameCodecBuilder to compress or decompress, but not both simultaneously, etc.) You don't have to do that in this PR, though I think maybe I should update the key names before we do a full release of 0.7.0.

Originally posted by @KingMob in #683 (comment)

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

No branches or pull requests

1 participant