Skip to content

do not compress gzip'd bodies; helpers to return compressed bodies - #69

Open
c-cube wants to merge 1 commit into
masterfrom
sc/more-control-over-httpev-compression
Open

c-cube wants to merge 1 commit into
masterfrom
sc/more-control-over-httpev-compression

Conversation

@c-cube

@c-cube c-cube commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@c-cube
c-cube force-pushed the sc/more-control-over-httpev-compression branch from b45becf to 7a38096 Compare September 15, 2026 15:34
@c-cube
c-cube requested a review from rr0gi September 15, 2026 15:34
@c-cube
c-cube marked this pull request as ready for review September 15, 2026 16:11

@rr0gi rr0gi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

minor

Comment thread httpev.ml
Comment on lines +429 to +435
let has_header_value name value hdrs =
List.exists (fun (k,v) -> Stre.iequal k name && Stre.iequal (String.strip v) value) hdrs

let is_application_gzip hdrs =
List.exists begin fun (k,v) ->
Stre.iequal k "content-type" && Stre.iequal (String.strip @@ Stre.before v ";") "application/gzip"
end hdrs

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

there is find_header helper, lets use that

Comment thread httpev.ml
in
(* possibly apply encoding *)
let (hdrs,body) =
(* TODO do not apply encoding to application/gzip *)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍 :)

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.

2 participants