-
Notifications
You must be signed in to change notification settings - Fork 69
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
Try using httpaf
as backing http implementation
#94
Conversation
Looks good to me. I'm definitely for this direction 👍 |
@rgrinberg Once |
Small update, this works with the httpaf packages published on opam now. The static file middleware is available now. Missing pieces:
|
@rgrinberg One missing piece left is handling of Cookie headers. Not sure if we should add an implementation (similar implementation as what's present in Cohttp) as that seems like something that can be used independently of opium. Apart from that i''m also not sure we can do anything about the sexp derivers without upstream changes. |
Some more thing to add in httpaf implementation |
https://github.com/inhabitedtype/websocketaf will be the candidate for the websocket support |
Link "Lightweight OCaml Webapp Tutorial" from README Followup to #127
* Link OCaml Webapp Tutorial from README (rgrinberg#131) Link "Lightweight OCaml Webapp Tutorial" from README Followup to rgrinberg#127 * remove unused dependencies (rgrinberg#132) * feat: support cohttp lwt_stream body (rgrinberg#135) * Update stream impl (rgrinberg#137) * forward headers and code * First try with httpaf * add logs + bigstringaf as deps * run ocamlformat * Fix opam files Co-authored-by: Shon Feder <[email protected]>
* Link OCaml Webapp Tutorial from README (rgrinberg#131) Link "Lightweight OCaml Webapp Tutorial" from README Followup to rgrinberg#127 * remove unused dependencies (rgrinberg#132) * feat: support cohttp lwt_stream body (rgrinberg#135) * Update stream impl (rgrinberg#137) * forward headers and code * First try with httpaf * add logs + bigstringaf as deps * run ocamlformat * Fix opam files Co-authored-by: Shon Feder <[email protected]>
@rgrinberg Just to start a discussion about using
httpaf
as the backing http implementation. This can be used to discuss gaps from current implementation.httpaf-lwt
isn't published on opam yet, so people wanting to try this locally would need to use thepin-depends
defined in the opam files in the PR.On a sidenote: with a http2 implementation announces on discource yesterday (https://discuss.ocaml.org/t/ann-h2-an-http-2-implementation-for-ocaml/3578)
This pull-request could be rejected if the idea would be to have some sort of abstraction over that and httpaf so
opium
could be used with both HTTP1 and HTTP2