Forum Discussion
OTS02
Nov 29, 2011Cirrus
universal persistence using jsessionid
Have Universal persistence set up and use this irule:
when HTTP_RESPONSE {
if { [HTTP::cookie exists "JSESSIONID"] } {
persist add uie [HTTP::cookie "JSESSIONID"]
lo...
OTS02
Jan 13, 2012Cirrus
Tried this, and it may be working.
when HTTP_RESPONSE {
if { [HTTP::cookie "JSESSIONID"] ne ""} {
persist add uie [HTTP::cookie "JSESSIONID"]
log local0. "[IP::client_addr] Clairmail persistence HTTP_Response. Cookies: [HTTP::header values Cookie]"
}
else {
set rndumb [expr { int(100000000 * rand()) }]
HTTP::cookie insert name "JSESSIONID" value [HTTP::cookie value $rndumb]
log local0. "[IP::client_addr] assigned a random cookie, $rndumb"
}
}
when HTTP_REQUEST {
if { [HTTP::cookie "JSESSIONID"] ne ""} {
persist uie [HTTP::cookie "JSESSIONID"]
log local0. "[IP::client_addr] Clairmail HttpRequest. Set-Cookies: [HTTP::header values Cookie]"
}
}
Can you tell me how to convert the random decimal to hex? Or maybe how to generate a random hex stream?
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects