BUG/MEDIUM: Update read expiration date on synchronous send

On asynchronous sends, when a write activity is reported, the write
expiration date of the consumer is updated and, if the stream is not
independant, the read expiration date of the producer is renewed. It is
pretty useful in HTTP when the client is uploading a file and the server is
waiting a full request to reply. This way, we don't hit the server timeout.

However, on synchronous sends, the write activity may be lost. Indeed, a
write activity is reported, but it is cleared at the end of
process_stream(), when stream_update_both_sc() is called. As a side effect,
the read expiration date of the producer is never renewed. Most of time, it
is pretty hard to trigger any timeout this way because of the
fast-forwarding. The stream is not woken up and only asynchronous sends are
performed. But if a filter is registered on the request data forwarding, it
is not possible to perform fast-forwarding. It this case, it is easy to hit
the server timeout if the client is too slow or if the request payload is
huge.

To fix the bug, the read expiration date is renewed on synchronous
sends. The write expiration date is updated in si_update_tx(). So there is
not issue on this side.

The 2.8 is not affected by this issue. Thus there is no upstream id. This
patch must be backported as far as 2.0.

(cherry picked from commit 52bcb68d37416c5df653d110ca7b5b37f76e7109)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit b4db0d590313f71fe57bb26cc9fceb0735ef0f67)
[cf: changes applied in src/stream_interface.c]
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 29f49f8b02ae376b9c65d434b10a8597ab81425e)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
1 file changed