Hi,
>
> I just tested and the following change seems to work fine:
>
> if (req->body_size + req->ntoread > req->evcon->max_body_size) {
>
This is wrong case of chunked response and inaccurate when ntoread < 0.
I'd suggest to add something like
if (!req->chunked && req->ntoread > 0 && req->ntoread >
req->evcon->max_body_size) {
evhttp_connection_fail(...);
}
in the beginning of evhttp_read_body().
--
WBR,
Constantine
