Skip to content

Commit

Permalink
http: multipart unused code removal
Browse files Browse the repository at this point in the history
  • Loading branch information
catenacyber committed Jun 1, 2024
1 parent 24aaf4e commit 29dd084
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
16 changes: 0 additions & 16 deletions src/app-layer-htp.c
Original file line number Diff line number Diff line change
Expand Up @@ -492,21 +492,6 @@ void AppLayerHtpEnableResponseBodyCallback(void)
SCReturn;
}

/**
* \brief Sets a flag that informs the HTP app layer that some module in the
* engine needs the http request multi part header.
*
* \initonly
*/
static void AppLayerHtpNeedMultipartHeader(void)
{
SCEnter();
AppLayerHtpEnableRequestBodyCallback();

SC_ATOMIC_OR(htp_config_flags, HTP_REQUIRE_REQUEST_MULTIPART);
SCReturn;
}

/**
* \brief Sets a flag that informs the HTP app layer that some module in the
* engine needs the http request file.
Expand All @@ -516,7 +501,6 @@ static void AppLayerHtpNeedMultipartHeader(void)
void AppLayerHtpNeedFileInspection(void)
{
SCEnter();
AppLayerHtpNeedMultipartHeader();
AppLayerHtpEnableRequestBodyCallback();
AppLayerHtpEnableResponseBodyCallback();

Expand Down
5 changes: 1 addition & 4 deletions src/app-layer-htp.h
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,7 @@ typedef struct HtpState_ {
} HtpState;

/** part of the engine needs the request body (e.g. http_client_body keyword) */
#define HTP_REQUIRE_REQUEST_BODY (1 << 0)
/** part of the engine needs the request body multipart header (e.g. filename
* and / or fileext keywords) */
#define HTP_REQUIRE_REQUEST_MULTIPART (1 << 1)
#define HTP_REQUIRE_REQUEST_BODY (1 << 0)
/** part of the engine needs the request file (e.g. log-file module) */
#define HTP_REQUIRE_REQUEST_FILE (1 << 2)
/** part of the engine needs the request body (e.g. file_data keyword) */
Expand Down

0 comments on commit 29dd084

Please sign in to comment.