mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-10 17:17:06 +02:00
BUG/MINOR: http: Don't reset the transaction if there are still data to send
To reset an HTTP transaction, we need to be sure all data were sent, for the request and the response. There are tests on request and response buffers for that in http_resync_states function. But the return code was wrong. We must return 0 to wait. This patch must be backported in 1.7
This commit is contained in:
parent
cdaea89a0c
commit
a94fda30bd
@ -5654,16 +5654,18 @@ int http_resync_states(struct stream *s)
|
||||
* and the response buffer must realigned
|
||||
* (realign is done is http_end_txn_clean_session).
|
||||
*/
|
||||
if (s->req.buf->o)
|
||||
if (s->req.buf->o) {
|
||||
s->req.flags |= CF_WAKE_WRITE;
|
||||
else if (s->res.buf->o)
|
||||
s->res.flags |= CF_WAKE_WRITE;
|
||||
else {
|
||||
s->req.analysers = AN_REQ_FLT_END;
|
||||
s->res.analysers = AN_RES_FLT_END;
|
||||
txn->flags |= TX_WAIT_CLEANUP;
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
else if (s->res.buf->o) {
|
||||
s->res.flags |= CF_WAKE_WRITE;
|
||||
return 0;
|
||||
}
|
||||
s->req.analysers = AN_REQ_FLT_END;
|
||||
s->res.analysers = AN_RES_FLT_END;
|
||||
txn->flags |= TX_WAIT_CLEANUP;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return txn->req.msg_state != old_req_state ||
|
||||
|
Loading…
Reference in New Issue
Block a user