diff --git a/src/app-layer-htp-libhtp.c b/src/app-layer-htp-libhtp.c index 2fbd5eae33..dcc4a92b8b 100644 --- a/src/app-layer-htp-libhtp.c +++ b/src/app-layer-htp-libhtp.c @@ -61,7 +61,7 @@ * \param uri_include_all boolean to indicate if scheme, username/password, hostname and port should be part of the buffer */ -bstr *SCHTPGenerateNormalizedUri(htp_tx_t *tx, htp_uri_t *uri, int uri_include_all) +bstr *SCHTPGenerateNormalizedUri(htp_tx_t *tx, htp_uri_t *uri, bool uri_include_all) { if (uri == NULL) return NULL; diff --git a/src/app-layer-htp-libhtp.h b/src/app-layer-htp-libhtp.h index 574dda4134..b08cda508e 100644 --- a/src/app-layer-htp-libhtp.h +++ b/src/app-layer-htp-libhtp.h @@ -48,6 +48,6 @@ #include "suricata-common.h" -bstr *SCHTPGenerateNormalizedUri(htp_tx_t *tx, htp_uri_t *uri, int uri_include_all); +bstr *SCHTPGenerateNormalizedUri(htp_tx_t *tx, htp_uri_t *uri, bool uri_include_all); #endif /* __APP_LAYER_HTP_LIBHTP__H__ */ diff --git a/src/app-layer-htp.c b/src/app-layer-htp.c index b576ba3b7b..000fc88bbd 100644 --- a/src/app-layer-htp.c +++ b/src/app-layer-htp.c @@ -2463,7 +2463,7 @@ static int HTPCallbackResponseHeaderData(htp_tx_data_t *tx_data) */ static void HTPConfigSetDefaultsPhase1(HTPCfgRec *cfg_prec) { - cfg_prec->uri_include_all = FALSE; + cfg_prec->uri_include_all = false; cfg_prec->request.body_limit = HTP_CONFIG_DEFAULT_REQUEST_BODY_LIMIT; cfg_prec->response.body_limit = HTP_CONFIG_DEFAULT_RESPONSE_BODY_LIMIT; cfg_prec->request.inspect_min_size = HTP_CONFIG_DEFAULT_REQUEST_INSPECT_MIN_SIZE; @@ -2785,7 +2785,7 @@ static void HTPConfigParseParameters(HTPCfgRec *cfg_prec, ConfNode *s, HTP_DECODER_URL_PATH, ConfValIsTrue(p->val)); } else if (strcasecmp("uri-include-all", p->name) == 0) { - cfg_prec->uri_include_all = ConfValIsTrue(p->val); + cfg_prec->uri_include_all = (1 == ConfValIsTrue(p->val)); SCLogDebug("uri-include-all %s", cfg_prec->uri_include_all ? "enabled" : "disabled"); } else if (strcasecmp("query-plusspace-decode", p->name) == 0) { diff --git a/src/app-layer-htp.h b/src/app-layer-htp.h index c8c3a7f7b9..dee5c17e83 100644 --- a/src/app-layer-htp.h +++ b/src/app-layer-htp.h @@ -157,8 +157,6 @@ typedef struct HTPCfgRec_ { htp_cfg_t *cfg; struct HTPCfgRec_ *next; - int uri_include_all; /**< use all info in uri (bool) */ - /** max size of the client body we inspect */ int randomize; int randomize_range; @@ -171,6 +169,8 @@ typedef struct HTPCfgRec_ { HTPCfgDir request; HTPCfgDir response; + + bool uri_include_all; /**< use all info in uri (bool) */ } HTPCfgRec; /** Struct used to hold chunks of a body on a request */