mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-13 23:14:46 +00:00
[BUG] stream_interface: truncate buffers when sending error messages
When an error message is returned to a client, all buffer contents were left intact. Since the analysers were removed, the potentially invalid data that were read had a chance to be sent too. Now we ensure we only keep the already scheduled data in the buffer and we truncate it after that. That means that responses with data that must be blocked will really be blocked, and that incorrectly chunked data will be stopped at the point where the chunking fails.
This commit is contained in:
parent
3fe693b4d6
commit
798e128a4d
@ -73,6 +73,8 @@ void stream_int_retnclose(struct stream_interface *si, const struct chunk *msg)
|
||||
buffer_abort(si->ib);
|
||||
buffer_auto_close(si->ib);
|
||||
buffer_erase(si->ib);
|
||||
|
||||
buffer_cut_tail(si->ob);
|
||||
if (likely(msg && msg->len))
|
||||
buffer_write(si->ob, msg->str, msg->len);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user