mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-12-23 18:40:59 +01:00
BUG/MEDIUM: http-ana: Properly detect client abort when forwarding response (v2)
The first attempt to fix this issue (c672b2a29 "BUG/MINOR: http-ana: Properly detect client abort when forwarding the response") was not fully correct and could be responsible to false report of client abort during the response forwarding. I guess it is possible to truncate the response. Instead, we must also take care that the client closed on its side, by checking SC_FL_EOS flag on the front SC. Indeed, if the client has aborted, this flag should be set. This patch should be backported as far as 2.8.
This commit is contained in:
parent
5b19d95850
commit
a483450fa2
@ -2258,7 +2258,7 @@ int http_response_forward_body(struct stream *s, struct channel *res, int an_bit
|
|||||||
* server abort.
|
* server abort.
|
||||||
*/
|
*/
|
||||||
if (msg->msg_state < HTTP_MSG_ENDING && (s->scb->flags & (SC_FL_EOS|SC_FL_ABRT_DONE))) {
|
if (msg->msg_state < HTTP_MSG_ENDING && (s->scb->flags & (SC_FL_EOS|SC_FL_ABRT_DONE))) {
|
||||||
if ((s->scb->flags & (SC_FL_ABRT_DONE|SC_FL_SHUT_DONE)) == (SC_FL_ABRT_DONE|SC_FL_SHUT_DONE))
|
if ((s->scf->flags & SC_FL_EOS) && (s->scb->flags & (SC_FL_ABRT_DONE|SC_FL_SHUT_DONE)) == (SC_FL_ABRT_DONE|SC_FL_SHUT_DONE))
|
||||||
goto return_cli_abort;
|
goto return_cli_abort;
|
||||||
/* If we have some pending data, we continue the processing */
|
/* If we have some pending data, we continue the processing */
|
||||||
if (htx_is_empty(htx))
|
if (htx_is_empty(htx))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user