32 #include "htp/htp_rs.h"
44 static int g_buffer_id = 0;
45 static int g_http2_thread_id = 0;
47 #ifdef KEYWORD_TOSERVER
50 const uint8_t _flow_flags,
void *txv,
const int list_id)
56 htp_tx_t *tx = (htp_tx_t *)txv;
58 if (htp_tx_request_headers(tx) == NULL)
61 const htp_header_t *h = htp_tx_request_header(tx,
HEADER_NAME);
62 if (h == NULL || htp_header_value(h) == NULL) {
63 SCLogDebug(
"HTTP %s header not present in this request",
68 const uint32_t data_len = (uint32_t)htp_header_value_len(h);
69 const uint8_t *data = htp_header_value_ptr(h);
72 det_ctx, list_id, buffer, data, data_len, transforms);
87 const uint8_t *b = NULL;
90 if (thread_buf == NULL)
92 if (SCHttp2TxGetHeaderValue(txv, STREAM_TOSERVER,
HEADER_NAME, &b, &b_len, thread_buf) != 1)
94 if (b == NULL || b_len == 0)
104 #ifdef KEYWORD_TOCLIENT
107 const uint8_t _flow_flags,
void *txv,
const int list_id)
113 htp_tx_t *tx = (htp_tx_t *)txv;
115 if (htp_tx_response_headers(tx) == NULL)
118 const htp_header_t *h = htp_tx_response_header(tx,
HEADER_NAME);
119 if (h == NULL || htp_header_value(h) == NULL) {
120 SCLogDebug(
"HTTP %s header not present in this request",
125 const uint32_t data_len = (uint32_t)htp_header_value_len(h);
126 const uint8_t *data = htp_header_value_ptr(h);
129 det_ctx, list_id, buffer, data, data_len, transforms);
144 const uint8_t *b = NULL;
147 if (thread_buf == NULL)
149 if (SCHttp2TxGetHeaderValue(txv, STREAM_TOCLIENT,
HEADER_NAME, &b, &b_len, thread_buf) != 1)
151 if (b == NULL || b_len == 0)
181 static void DetectHttpHeadersRegisterStub(
void)
184 #ifdef KEYWORD_NAME_LEGACY
190 #if defined(KEYWORD_TOSERVER) && defined(KEYWORD_TOSERVER)
197 #ifdef KEYWORD_TOSERVER
199 GetRequestData,
ALPROTO_HTTP1, HTP_REQUEST_PROGRESS_HEADERS);
203 #ifdef KEYWORD_TOCLIENT
205 GetResponseData,
ALPROTO_HTTP1, HTP_RESPONSE_PROGRESS_HEADERS);
209 #ifdef KEYWORD_TOSERVER
215 #ifdef KEYWORD_TOCLIENT
225 BUFFER_NAME, SCHttp2ThreadBufDataInit, NULL, SCHttp2ThreadBufDataFree);