mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-27 00:31:22 +02:00
BUG/MINOR: httpclient: Set conn-stream/channel EOI flags at the end of request
In HTX, HTX_FL_EOM flag is added on the message to notifiy the end of the message was received. In addition, the producer must set CS_FL_EOI flag on the conn-stream. If it is a mux, the stream-interface is responsible to set CF_EOI flag on the input channel. But, for now, if the producer is an applet, in addition to the conn-stream flag, it must also set the channel one. These flags are used to notify the stream that the message is finished and no more data are expected. It is especially important when the message itself it directly forwarded from one side to the other. Because in this case, the stream has no way to see the HTX_FL_EOM flag on the message. Otherwise, the stream will detect a client or a server abort, depending on the side. For the HTTP client, it is not really easy to diagnose this error because there is also another bug hiding this one. All HTTP request analyzers are not set on the input channel. This will be fixed by another patch. This patch must be backported to 2.5. It is related to the issue #1593.
This commit is contained in:
parent
6709538068
commit
3d4332419c
@ -720,8 +720,11 @@ static void httpclient_applet_io_handler(struct appctx *appctx)
|
||||
goto more;
|
||||
|
||||
/* if the request contains the HTX_FL_EOM, we finished the request part. */
|
||||
if (htx->flags & HTX_FL_EOM)
|
||||
if (htx->flags & HTX_FL_EOM) {
|
||||
si->cs->flags |= CS_FL_EOI;
|
||||
req->flags |= CF_EOI;
|
||||
appctx->st0 = HTTPCLIENT_S_RES_STLINE;
|
||||
}
|
||||
|
||||
goto more; /* we need to leave the IO handler once we wrote the request */
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user