barko/ocaml-cohttp — comment on commit 3dabdd7ee61d899b2039aa23e516045dc16c5cc4
File: lib/http_pool.ml line 79
By williamleferrand:

Yes. This code waits for exactly "content-length" bytes before returning. Thus, if the connexion is still alive and if the server does not return what it claimed it was going to send, it will hang.

It's perhaps not correct, as options requests have content-length > 0 and no content length.

This code is supposed to add http 1.1 features to cohttp client; in http 1.1 the connexion remains opened for a short time after the full payload is sent so that it can be reused; it caused cohttp to hang as it relied on the termination of the connection to return.

Overall, cohttp would require some serious cleaning