BUG/MEDIUM: cache: bad computation of the remaining size
The cache was not setting the hdrs_len to zero when we are called
in the http_forward_data with headers + body.
The consequence is to always try to store a size - the size of headers,
during the calls to http_forward_data even when it has already forwarded
the headers.
Thanks to Cyril Bonté for reporting this bug.
Must be backported to 1.8.
diff --git a/src/cache.c b/src/cache.c
index 06d7ce8..cdfd43d 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -228,6 +228,7 @@
MIN(bi_contig_data(msg->chn->buf), len - st->hdrs_len));
/* Rewind the buffer to forward all data */
b_rew(msg->chn->buf, st->hdrs_len);
+ st->hdrs_len = 0;
if (ret)
goto disable_cache;
}