mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-27 00:31:22 +02:00
BUG/MEDIUM: proto-htx: Set SI_FL_NOHALF on server side when request is done
In the function htx_end_request, the flag SI_FL_NOHALF must be set on the server side once the request is in the state HTTP_MSG_DONE. But the response state was checked before and the flag was only set when the response was also in the state HTTP_MSG_DONE. Of course, it is not desirable. This patch must be backported to 1.9.
This commit is contained in:
parent
d7607de065
commit
d01ce4003d
@ -5068,13 +5068,6 @@ static void htx_end_request(struct stream *s)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (txn->req.msg_state == HTTP_MSG_DONE) {
|
if (txn->req.msg_state == HTTP_MSG_DONE) {
|
||||||
if (txn->rsp.msg_state < HTTP_MSG_DONE) {
|
|
||||||
/* The server has not finished to respond, so we
|
|
||||||
* don't want to move in order not to upset it.
|
|
||||||
*/
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* No need to read anymore, the request was completely parsed.
|
/* No need to read anymore, the request was completely parsed.
|
||||||
* We can shut the read side unless we want to abort_on_close,
|
* We can shut the read side unless we want to abort_on_close,
|
||||||
* or we have a POST request. The issue with POST requests is
|
* or we have a POST request. The issue with POST requests is
|
||||||
@ -5099,6 +5092,13 @@ static void htx_end_request(struct stream *s)
|
|||||||
*/
|
*/
|
||||||
chn->flags |= CF_NEVER_WAIT;
|
chn->flags |= CF_NEVER_WAIT;
|
||||||
|
|
||||||
|
if (txn->rsp.msg_state < HTTP_MSG_DONE) {
|
||||||
|
/* The server has not finished to respond, so we
|
||||||
|
* don't want to move in order not to upset it.
|
||||||
|
*/
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* When we get here, it means that both the request and the
|
/* When we get here, it means that both the request and the
|
||||||
* response have finished receiving. Depending on the connection
|
* response have finished receiving. Depending on the connection
|
||||||
* mode, we'll have to wait for the last bytes to leave in either
|
* mode, we'll have to wait for the last bytes to leave in either
|
||||||
|
Loading…
x
Reference in New Issue
Block a user