69 static int g_http_cookie_buffer_id = 0;
73 Flow *_f,
const uint8_t _flow_flags,
74 void *txv,
const int list_id);
77 Flow *_f,
const uint8_t _flow_flags,
78 void *txv,
const int list_id);
93 "content modifier to match only on the HTTP cookie-buffer";
117 GetRequestData,
ALPROTO_HTTP1, HTP_REQUEST_PROGRESS_HEADERS);
119 GetResponseData,
ALPROTO_HTTP1, HTP_REQUEST_PROGRESS_HEADERS);
132 "http cookie header");
176 const uint8_t _flow_flags,
void *txv,
const int list_id)
180 htp_tx_t *tx = (htp_tx_t *)txv;
182 if (htp_tx_request_headers(tx) == NULL)
185 const htp_header_t *h = htp_tx_request_header(tx,
"Cookie");
186 if (h == NULL || htp_header_value(h) == NULL) {
187 SCLogDebug(
"HTTP cookie header not present in this request");
191 const uint32_t data_len = (uint32_t)htp_header_value_len(h);
192 const uint8_t *data = htp_header_value_ptr(h);
195 det_ctx, list_id, buffer, data, data_len, transforms);
203 const uint8_t _flow_flags,
void *txv,
const int list_id)
207 htp_tx_t *tx = (htp_tx_t *)txv;
209 if (htp_tx_response_headers(tx) == NULL)
212 const htp_header_t *h = htp_tx_response_header(tx,
"Set-Cookie");
213 if (h == NULL || htp_header_value(h) == NULL) {
214 SCLogDebug(
"HTTP cookie header not present in this request");
218 const uint32_t data_len = (uint32_t)htp_header_value_len(h);
219 const uint8_t *data = htp_header_value_ptr(h);
222 det_ctx, list_id, buffer, data, data_len, transforms);
235 const uint8_t *b = NULL;
237 if (SCHttp2TxGetCookie(txv, STREAM_TOSERVER, &b, &b_len) != 1)
239 if (b == NULL || b_len == 0)
255 const uint8_t *b = NULL;
257 if (SCHttp2TxGetCookie(txv, STREAM_TOCLIENT, &b, &b_len) != 1)
259 if (b == NULL || b_len == 0)