Persist On Last JSESSIONID in HTTP Parameter
Updated Jun 06, 2023
Version 2.0Was this article helpful?
Hi,
you can do it with a simpler code:
when HTTP_REQUEST {
set parameters [findstr [HTTP::path] ";" 1]
foreach parameter [split $parameters ";"] {
scan $parameter {%[^=]=%s} name value
if {$name equals "jsessionid"} {set session_id $value}
}
if {$session_id ne ""}{
Persist on the parsed session ID for X seconds
if {$debug}{log local0.debug "$logTuple :: Single JsessionID in: [HTTP::host][HTTP::uri]"}
persist uie $session_id 86400
}
}