Skip to content

Commit

Permalink
http: remove obsolete checks for files
Browse files Browse the repository at this point in the history
With libhtp having been improved, Suricata does not need to check
that there is either a response line or HTTP/0.9 as libhtp
will trigger the callbacks only in those cases
  • Loading branch information
catenacyber authored and victorjulien committed Jul 10, 2023
1 parent 02dece5 commit fb2fbaf
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/app-layer-htp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1766,9 +1766,7 @@ static int HtpResponseBodyHandle(HtpState *hstate, HtpTxUserData *htud,
* we check for tx->response_line in case of junk
* interpreted as body before response line
*/
if (!(htud->tcflags & HTP_FILENAME_SET) &&
(tx->response_line != NULL || tx->is_protocol_0_9))
{
if (!(htud->tcflags & HTP_FILENAME_SET)) {
SCLogDebug("setting up file name");

uint8_t *filename = NULL;
Expand Down Expand Up @@ -1818,9 +1816,7 @@ static int HtpResponseBodyHandle(HtpState *hstate, HtpTxUserData *htud,
htud->tcflags &= ~HTP_DONTSTORE;
}
}
}
else if (tx->response_line != NULL || tx->is_protocol_0_9)
{
} else {
/* otherwise, just store the data */

if (!(htud->tcflags & HTP_DONTSTORE)) {
Expand Down

0 comments on commit fb2fbaf

Please sign in to comment.