mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-23 14:51:27 +02:00
BUG/MAJOR: http: fix timeouts during data forwarding
Patches c623c17 ("MEDIUM: http: start to centralize the forwarding code") and bed410e ("MAJOR: http: centralize data forwarding in the request path") merged into 1.5-dev23 cause transfers to be silently aborted after the server timeout due to the fact that the analysers are woken up when the timeout strikes and they believe they have nothing more to do, so they're terminating the transfer. No backport is needed.
This commit is contained in:
parent
af3cf70d7c
commit
efdf094df2
@ -5025,6 +5025,12 @@ int http_request_forward_body(struct session *s, struct channel *req, int an_bit
|
|||||||
/* in most states, we should abort in case of early close */
|
/* in most states, we should abort in case of early close */
|
||||||
channel_auto_close(req);
|
channel_auto_close(req);
|
||||||
|
|
||||||
|
if (req->to_forward) {
|
||||||
|
/* We can't process the buffer's contents yet */
|
||||||
|
req->flags |= CF_WAKE_WRITE;
|
||||||
|
goto missing_data;
|
||||||
|
}
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
if (msg->msg_state == HTTP_MSG_DATA) {
|
if (msg->msg_state == HTTP_MSG_DATA) {
|
||||||
/* must still forward */
|
/* must still forward */
|
||||||
@ -6194,6 +6200,12 @@ int http_response_forward_body(struct session *s, struct channel *res, int an_bi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (res->to_forward) {
|
||||||
|
/* We can't process the buffer's contents yet */
|
||||||
|
res->flags |= CF_WAKE_WRITE;
|
||||||
|
goto missing_data;
|
||||||
|
}
|
||||||
|
|
||||||
if (unlikely(s->comp_algo != NULL) && msg->msg_state < HTTP_MSG_TRAILERS) {
|
if (unlikely(s->comp_algo != NULL) && msg->msg_state < HTTP_MSG_TRAILERS) {
|
||||||
/* We need a compression buffer in the DATA state to put the
|
/* We need a compression buffer in the DATA state to put the
|
||||||
* output of compressed data, and in CRLF state to let the
|
* output of compressed data, and in CRLF state to let the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user