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

Try using httpaf as backing http implementation #94

Merged
merged 8 commits into from
Jan 11, 2020
Merged

Try using httpaf as backing http implementation #94

merged 8 commits into from
Jan 11, 2020

Conversation

anuragsoni
Copy link
Collaborator

@anuragsoni anuragsoni commented Mar 28, 2019

@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 the pin-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

@rgrinberg
Copy link
Owner

Looks good to me. I'm definitely for this direction 👍

@anuragsoni
Copy link
Collaborator Author

@rgrinberg Once httpaf-lwt is published on opam i'll update the PR. We'd just need to fill in the static file server and the cookie handling that is done via Cohttp right now.

@anuragsoni
Copy link
Collaborator Author

anuragsoni commented May 21, 2019

Small update, this works with the httpaf packages published on opam now. The static file middleware is available now. Missing pieces:

@anuragsoni anuragsoni marked this pull request as ready for review May 23, 2019 00:28
@anuragsoni
Copy link
Collaborator Author

anuragsoni commented May 23, 2019

@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.

@Et7f3
Copy link

Et7f3 commented Aug 26, 2019

Some more thing to add in httpaf implementation
#96
websocket support (at least with one other libraries)

@anuragsoni
Copy link
Collaborator Author

Some more thing to add in httpaf implementation
#96
websocket support (at least with one other libraries)

https://github.com/inhabitedtype/websocketaf will be the candidate for the websocket support

@anuragsoni anuragsoni changed the base branch from master to develop December 3, 2019 04:08
@anuragsoni anuragsoni changed the base branch from develop to master December 6, 2019 22:48
shonfeder and others added 2 commits January 2, 2020 21:23
Link "Lightweight OCaml Webapp Tutorial" from README

Followup to #127
@anuragsoni anuragsoni changed the base branch from master to httpaf January 11, 2020 16:43
@anuragsoni anuragsoni merged commit e80ce7d into rgrinberg:httpaf Jan 11, 2020
@anuragsoni anuragsoni deleted the httpaf branch January 14, 2020 02:26
EduardoRFS pushed a commit to EduardoRFS/opium that referenced this pull request Mar 15, 2020
* 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]>
EduardoRFS pushed a commit to EduardoRFS/opium that referenced this pull request Mar 15, 2020
* 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]>
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.

4 participants