From 542ef7684b7e83b9b728603c6cf0f382ef04a1ab Mon Sep 17 00:00:00 2001 From: Philippe Antoine Date: Mon, 26 Oct 2026 13:38:24 +0100 Subject: [PATCH] http1: make CONNECT change protocol at any tx and not just the first one Ticket: 9201 Follows RFC9110 section 3.3 : For example, a CONNECT request (Section 9.3.6) or a request with the Upgrade header field (Section 7.8) can occur at any time, not just in the first message on a connection. --- src/app-layer-htp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app-layer-htp.c b/src/app-layer-htp.c index 7c9102758e..97d651bb2b 100644 --- a/src/app-layer-htp.c +++ b/src/app-layer-htp.c @@ -1817,7 +1817,7 @@ static int HTPCallbackResponseComplete(const htp_connp_t *connp, htp_tx_t *tx) /* any 2XX status response implies that the connection will become a tunnel immediately after this packet (RFC 7230, 3.3.3). */ if ((htp_tx_response_status_number(tx) >= 200) && - (htp_tx_response_status_number(tx) < 300) && (hstate->transaction_cnt == 1)) { + (htp_tx_response_status_number(tx) < 300)) { uint16_t dp = 0; if (htp_tx_request_port_number(tx) != -1) { dp = (uint16_t)htp_tx_request_port_number(tx);