68 static int g_http_cookie_buffer_id = 0;
72 Flow *_f,
const uint8_t _flow_flags,
73 void *txv,
const int list_id);
76 Flow *_f,
const uint8_t _flow_flags,
77 void *txv,
const int list_id);
92 "content modifier to match only on the HTTP cookie-buffer";
116 GetRequestData,
ALPROTO_HTTP1, HTP_REQUEST_PROGRESS_HEADERS);
118 GetResponseData,
ALPROTO_HTTP1, HTP_REQUEST_PROGRESS_HEADERS);
131 "http cookie header");
175 const uint8_t _flow_flags,
void *txv,
const int list_id)
179 htp_tx_t *tx = (htp_tx_t *)txv;
181 if (htp_tx_request_headers(tx) == NULL)
184 const htp_header_t *h = htp_tx_request_header(tx,
"Cookie");
185 if (h == NULL || htp_header_value(h) == NULL) {
186 SCLogDebug(
"HTTP cookie header not present in this request");
190 const uint32_t data_len = htp_header_value_len(h);
191 const uint8_t *data = htp_header_value_ptr(h);
194 det_ctx, list_id, buffer, data, data_len, transforms);
202 const uint8_t _flow_flags,
void *txv,
const int list_id)
206 htp_tx_t *tx = (htp_tx_t *)txv;
208 if (htp_tx_response_headers(tx) == NULL)
211 const htp_header_t *h = htp_tx_response_header(tx,
"Set-Cookie");
212 if (h == NULL || htp_header_value(h) == NULL) {
213 SCLogDebug(
"HTTP cookie header not present in this request");
217 const uint32_t data_len = htp_header_value_len(h);
218 const uint8_t *data = htp_header_value_ptr(h);
221 det_ctx, list_id, buffer, data, data_len, transforms);
234 const uint8_t *b = NULL;
236 if (rs_http2_tx_get_cookie(txv, STREAM_TOSERVER, &b, &b_len) != 1)
238 if (b == NULL || b_len == 0)
254 const uint8_t *b = NULL;
256 if (rs_http2_tx_get_cookie(txv, STREAM_TOCLIENT, &b, &b_len) != 1)
258 if (b == NULL || b_len == 0)