]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
http: use const http_header_t in stub
authorPhilippe Antoine <pantoine@oisf.net>
Fri, 24 Jan 2025 16:07:33 +0000 (17:07 +0100)
committerVictor Julien <victor@inliniac.net>
Tue, 28 Jan 2025 08:32:43 +0000 (09:32 +0100)
In preparation of libhtp rust

src/detect-http-headers-stub.h

index cadae73e082439a7ccf39e011ceb228764437b63..2dfcda843493add21fdfa37054945d2e80a205cd 100644 (file)
@@ -57,7 +57,7 @@ static InspectionBuffer *GetRequestData(DetectEngineThreadCtx *det_ctx,
         if (htp_tx_request_headers(tx) == NULL)
             return NULL;
 
-        htp_header_t *h = (htp_header_t *)htp_tx_request_header(tx, HEADER_NAME);
+        const htp_header_t *h = htp_tx_request_header(tx, HEADER_NAME);
         if (h == NULL || htp_header_value(h) == NULL) {
             SCLogDebug("HTTP %s header not present in this request",
                        HEADER_NAME);
@@ -112,7 +112,7 @@ static InspectionBuffer *GetResponseData(DetectEngineThreadCtx *det_ctx,
         if (htp_tx_response_headers(tx) == NULL)
             return NULL;
 
-        htp_header_t *h = (htp_header_t *)htp_tx_response_header(tx, HEADER_NAME);
+        const htp_header_t *h = htp_tx_response_header(tx, HEADER_NAME);
         if (h == NULL || htp_header_value(h) == NULL) {
             SCLogDebug("HTTP %s header not present in this request",
                        HEADER_NAME);