mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-10 00:57:02 +02:00
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.
This commit is contained in:
parent
c3cd35f96c
commit
bcd9101a66
@ -228,6 +228,7 @@ cache_store_http_forward_data(struct stream *s, struct filter *filter,
|
|||||||
MIN(bi_contig_data(msg->chn->buf), len - st->hdrs_len));
|
MIN(bi_contig_data(msg->chn->buf), len - st->hdrs_len));
|
||||||
/* Rewind the buffer to forward all data */
|
/* Rewind the buffer to forward all data */
|
||||||
b_rew(msg->chn->buf, st->hdrs_len);
|
b_rew(msg->chn->buf, st->hdrs_len);
|
||||||
|
st->hdrs_len = 0;
|
||||||
if (ret)
|
if (ret)
|
||||||
goto disable_cache;
|
goto disable_cache;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user