ocaml-cohttp
ocaml-cohttp copied to clipboard
An OCaml library for HTTP clients and servers using Lwt or Async
This the client implementation of cohttp eio backend. Roughly, the PR aims to achieve the following (some are optional and/or outside the remit of this PR): - [x] cohttp-eio client...
Conduit on the server side of cohttp is a performance bottleneck and a source of complexity (dependencies, larger api surface). On the other hand, it is also rarely useful. The...
Tested with OCaml 4.04.0+flambda, cohttp 0.22.0, conduit 0.15.0, Lwt w/libev, CentOS 7 64bit VM: ```ocaml let server http_port = let callback _conn _req _body = Cohttp_lwt_unix.Server.respond ~status:`OK ~body:Cohttp_lwt_body.empty () in...
cohttp-eio does not ensure that the body has been fully consumed before trying to parse the next request. Example test case with the current output (add to the `server.md` file...
There is a new issue, which appeared after merging https://github.com/mirage/ocaml-cohttp/pull/905 (may or may not be related to it): ``` File "cohttp-lwt-unix/test/dune", line 22, characters 0-86: 22 | (rule 23 |...
Using today's origin/master, curl hangs if you request a page from the example server that doesn't exist. ``` $ git describe v5.0.0-177-g628d8716 ``` I ran the server with: ``` $...
Moreover the implementation contains two `(* TODO invalid input *)` that need to be addressed, documented or removed and another more obscure `TODO`: https://github.com/mirage/ocaml-cohttp/blob/dcec01fd2303c498bc98577f2fd8dc63e9f0cbc1/cohttp-server-lwt-unix/src/cohttp_server_lwt_unix.ml#L315
Now cohttp debug log is so unstructured that it is hard to see in for example datadog. I think it is preferred to use `Logs.Tag` for several information, url, http...