8.7. Capturing HTTP cookies

  1. Cookie capture simplifies the tracking a complete user session. This can be
  2. achieved using the "capture cookie" statement in the frontend. Please refer to
  3. section 4.2 for more details. Only one cookie can be captured, and the same
  4. cookie will simultaneously be checked in the request ("Cookie:" header) and in
  5. the response ("Set-Cookie:" header). The respective values will be reported in
  6. the HTTP logs at the "captured_request_cookie" and "captured_response_cookie"
  7. locations (see section 8.2.3 about HTTP log format). When either cookie is
  8. not seen, a dash ('-') replaces the value. This way, it's easy to detect when a
  9. user switches to a new session for example, because the server will reassign it
  10. a new cookie. It is also possible to detect if a server unexpectedly sets a
  11. wrong cookie to a client, leading to session crossing.

Examples :

  1. # capture the first cookie whose name starts with "ASPSESSION"
  2. capture cookie ASPSESSION len 32
  3. # capture the first cookie whose name is exactly "vgnvisitor"
  4. capture cookie vgnvisitor= len 32