mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-08 14:27:30 +00:00
[MEDIUM] stream_interface: make use of buffer_cut_tail() to report errors
The stream_int_return() function used to call buffer_erase() on the response buffer, which completely wipes it without taking care about whatever could have been there. Now we more carefully strip only data not scheduled to be sent.
This commit is contained in:
parent
9cb8daa203
commit
cb359e3f3c
@ -66,7 +66,7 @@ void stream_int_report_error(struct stream_interface *si)
|
||||
void stream_int_return(struct stream_interface *si, const struct chunk *msg)
|
||||
{
|
||||
buffer_erase(si->ib);
|
||||
buffer_erase(si->ob);
|
||||
buffer_cut_tail(si->ob);
|
||||
if (msg && msg->len)
|
||||
buffer_write(si->ob, msg->str, msg->len);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user