anmonteiro / httpun

A high performance, memory efficient, and scalable web server written in OCaml
Other
50 stars 11 forks source link

Fix the interaction between backpressure and fairness / yielding #93

Closed anmonteiro closed 3 years ago

anmonteiro commented 3 years ago

In the case where a request handler yields too much to other streams, there was a bug where http/af's request body implementation didn't have a chance to surface buffered bytes to the application, and instead buffered them forever.

The fix is to make sure that we flush the request body before trying to compute the next read operation.