69 static int g_http_cookie_buffer_id = 0;
70 static int g_http2_thread_id = 0;
74 Flow *_f,
const uint8_t _flow_flags,
75 void *txv,
const int list_id);
78 Flow *_f,
const uint8_t _flow_flags,
79 void *txv,
const int list_id);
94 "content modifier to match only on the HTTP cookie-buffer";
118 GetRequestData,
ALPROTO_HTTP1, HTP_REQUEST_PROGRESS_HEADERS);
120 GetResponseData,
ALPROTO_HTTP1, HTP_REQUEST_PROGRESS_HEADERS);
133 "http cookie header");
136 "http_cookie", SCHttp2ThreadBufDataInit, NULL, SCHttp2ThreadBufDataFree);
180 const uint8_t _flow_flags,
void *txv,
const int list_id)
184 htp_tx_t *tx = (htp_tx_t *)txv;
186 if (htp_tx_request_headers(tx) == NULL)
189 const htp_header_t *h = htp_tx_request_header(tx,
"Cookie");
190 if (h == NULL || htp_header_value(h) == NULL) {
191 SCLogDebug(
"HTTP cookie header not present in this request");
195 const uint32_t data_len = (uint32_t)htp_header_value_len(h);
196 const uint8_t *data = htp_header_value_ptr(h);
199 det_ctx, list_id, buffer, data, data_len, transforms);
207 const uint8_t _flow_flags,
void *txv,
const int list_id)
211 htp_tx_t *tx = (htp_tx_t *)txv;
213 if (htp_tx_response_headers(tx) == NULL)
216 const htp_header_t *h = htp_tx_response_header(tx,
"Set-Cookie");
217 if (h == NULL || htp_header_value(h) == NULL) {
218 SCLogDebug(
"HTTP cookie header not present in this request");
222 const uint32_t data_len = (uint32_t)htp_header_value_len(h);
223 const uint8_t *data = htp_header_value_ptr(h);
226 det_ctx, list_id, buffer, data, data_len, transforms);
239 const uint8_t *b = NULL;
242 if (thread_buf == NULL)
244 if (SCHttp2TxGetCookie(txv, STREAM_TOSERVER, &b, &b_len, thread_buf) != 1)
246 if (b == NULL || b_len == 0)
262 const uint8_t *b = NULL;
265 if (thread_buf == NULL)
267 if (SCHttp2TxGetCookie(txv, STREAM_TOCLIENT, &b, &b_len, thread_buf) != 1)
269 if (b == NULL || b_len == 0)