From c2059f68c165bf115aec59096ccdf1156d8bfdea Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Mon, 3 Jul 2023 12:54:55 -0600 Subject: [PATCH] http(1): depend on detection engine for file pruning Enables the pruning logic allowing for file_data to work on http1 response bodies. Ticket: #5868 --- src/app-layer-htp-file.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app-layer-htp-file.c b/src/app-layer-htp-file.c index 6d86573891f3..81158e11a853 100644 --- a/src/app-layer-htp-file.c +++ b/src/app-layer-htp-file.c @@ -103,6 +103,9 @@ int HTPFileOpen(HtpState *s, HtpTxUserData *tx, const uint8_t *filename, uint16_ flags = FileFlowToFlags(s->f, STREAM_TOCLIENT); + /* Depend on the detection engine for file pruning. */ + flags |= FILE_USE_DETECT; + if ((s->flags & HTP_FLAG_STORE_FILES_TS) || ((s->flags & HTP_FLAG_STORE_FILES_TX_TS) && txid == s->store_tx_id)) { flags |= FILE_STORE;