Skip to content

Commit

Permalink
http(1): depend on detection engine for file pruning
Browse files Browse the repository at this point in the history
Enables the pruning logic allowing for file_data to work on http1
response bodies.

Ticket: #5868
  • Loading branch information
jasonish committed Jul 3, 2023
1 parent 808198f commit c2059f6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/app-layer-htp-file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c2059f6

Please sign in to comment.