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

support compression headers #129

Open
kevinkreiser opened this issue Sep 20, 2023 · 1 comment
Open

support compression headers #129

kevinkreiser opened this issue Sep 20, 2023 · 1 comment

Comments

@kevinkreiser
Copy link
Owner

http protocol should support the content/accept encoding headers so that http clients which can and want to use compression when interacting with the server may do so.

where should the encoding happen? the obvious place would be when we finish parsing the request stream. the problem there is that that's on the main serving thread and would block request processing for other multiplexed requests. the best place then would be right before the request is worked on. the problem there is that the worker APIs are protocol agnostic. what this means is that the application which has the burden of knowing what protocol it's working on will.have to initiate the encoding. we have another problem though then which is that the pipeline can have multiple stages so the encoding needs to only happen at the last stage. again the application controls that so it will also know when it's even appropriate to check the encoding.

seems to me we should add some functions to the http request/response protocols to automatically handle this and modify the body contents and length amd encoding headers. a little bit of thought is needed to determine the most ergonomic way to do that though it seems doable

@paro-
Copy link

paro- commented Nov 20, 2023

+1.
We would also heavily benefit from this.

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

No branches or pull requests

2 participants