httpaf
httpaf copied to clipboard
A high performance, memory efficient, and scalable web server written in OCaml
Assuming a fresh install, and running: ```bash dune init proj helloworld opam install httpaf ``` add lib to the dune thing ``` (executable (public_name helloworld) (name main) (libraries helloworld httpaf))...
This PR follows the same idea to implement the HTTP upgrade mechanism as #159, although does so based on the refactored request queues in #172.
This PR adds Nix for easy-to-setup and reproducable build and develop environment. [](https://github.com/Nymphium/httpaf/actions/workflows/test.yml)
Currently, if you are writing to a body in a streaming manner, and the writer becomes closed, then you have to be careful to not write any more to the...
We normally indirectly gain access to the writer in two ways: one is through the `when_ready_to_write` callback, and the other through `transfer_to_writer` as an argument. Instead, just give the writer...
The lwt and async client implementations currently do not support encryption. Add support for SSL and/or TLS without adopting the approach that conduit did, i.e., build hacks and direct dependencies....
In many runtimes, there are separate reader and writer threads that drive the reading and writing from httpaf independently. So a thing that can happen is: - A request arrives....
Add `Reqd.respond_with_upgrade`, which will create response with a with status code 101, and the provided headers. On the next write operation, this response, along with the inspiring request will be...
The benchmark in https://github.com/mirage/ocaml-cohttp/issues/328 seems unrealistic to me since the request handler responds immediately. Usually, some database requests are performed to build the response. So, I have investigated what happens...