anmonteiro / httpun

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

Fix EOF invariant for empty bodies #102

Closed anmonteiro closed 3 years ago

anmonteiro commented 3 years ago

after #101 the eof_has_been_called field tracks if the EOF callback has been called when reading a message body. This mutable field requires that empty bodies be created everytime rather than reusing the same one every time, or on_eof callbacks will never be called at all after the first one.