mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-28 06:11:32 +01:00
The use of co_set_data() should be strictly limited to setting the amount of existing data to be transmitted. It ought not be used to decrement the output after the data have left the buffer, because doing so involves performing incorrect calculations using co_data() that still comprises data that are not in the buffer anymore. Let's use c_rew() for this, which is made exactly for this purpose, i.e. decrement c->output by as much as requested. This is cleaner, faster, and will permit stricter checks.