robur-coop / httpcats

A simple http client/server (http/1.1 & h2) for OCaml 5
Other
33 stars 6 forks source link

Expose server_connection functions to user #7

Open ada2k opened 4 months ago

ada2k commented 4 months ago

This allows for the user to use httpcats while writing their own server loop, which is essential for a number of usecases including parsing of the tcp PROXY protocol or custom logging code/logic that must run before a request is parsed. There is also a small change to the signature of handlers to avoid an assert false when H2 is impossible.

dinosaure commented 1 month ago

Not sure to understand the goal of this PR but I just added the ability to manipulate the underlying flow into the server handler (needed when we use the CONNECT method and try to implement a proxy with httpcats).