mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-10-26 13:31:30 +00:00
When a content receiver returned false, or threw, partway through a body, the drain after the response read a whole Content-Length again from where it stopped. It swallowed the start of the next request, so the rest was parsed as a request of its own once the handler answered below 400. A handler that called the content reader a second time read into the next request the same way. Mark the body once reading starts, and if it does not finish, answer with Connection: close and never drain it from the middle. Let each request's body be read only once.