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

add support for gzip + chunked #26

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tatchi
Copy link
Contributor

@tatchi tatchi commented May 6, 2024

This is based on #25, (only the second commit is relevant) and should add support for gzip compression with chunked (I haven't tested it)

@tatchi tatchi requested review from Khady, mfp and rr0gi May 6, 2024 09:48
@rr0gi
Copy link
Contributor

rr0gi commented May 10, 2024

if you insist on somehow fixing this :) then instead of yield hack should have gzip outputting into lwt io channel directly, not separate buffer

@@ -955,6 +958,10 @@ let send_reply c cout reply =
let push = function
| "" -> Lwt.return_unit
| s ->
let%lwt s = match c.req with
| Ready { encoding=Gzip; _ } -> Gzip_io.string_lwt s
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem right.
If I'm reading correctly you're Gzip-encoding each chunk. But that's not how it's meant to happen.
Compression precedes the chunking.

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

Successfully merging this pull request may close these issues.

3 participants