]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: contrib/modsecurity: Don't reset the status code during disconnect
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 31 May 2018 14:05:21 +0000 (16:05 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 4 Jun 2018 15:34:51 +0000 (17:34 +0200)
When the connection is closed by HAProxy, the status code provided in the
DISCONNECT frame is lost. By retransmitting it in the agent's reply, we are sure
to have it in the SPOE logs.

This patch may be backported in 1.8.

contrib/modsecurity/spoa.c

index 18ef1d2454a1a14d5b33b689e83bdcdc3071a8c5..81e311849c487a56efd7ed7a2fc73b42f34496fc 100644 (file)
@@ -1481,7 +1481,6 @@ read_frame_cb(evutil_socket_t fd, short events, void *arg)
                        if (client->status_code != SPOE_FRM_ERR_NONE)
                                LOG(client->worker, "<%lu> Peer closed connection: %s",
                                    client->id, spoe_frm_err_reasons[client->status_code]);
-                       client->status_code = SPOE_FRM_ERR_NONE;
                        goto disconnect;
        }