Forum Discussion
vlavergne_12825
Jul 28, 2005Historic F5 Account
Persist on the SET Cookie response from the server
Hi F5 Rulers !
I am currently having a customer with an iRule who want to persist on the SET COOKIE message contained in the server Response to the FIRST client REQUEST.
I would like to know...
vlavergne_12825
Aug 01, 2005Historic F5 Account
You are right but I hadn't any BIG-IP in front of me to verify !! That will be nice to have such an interface on devcentral to verify the rule syntax... However here is the final rule
when HTTP_REQUEST {
if { [HTTP::cookie exists "PHPSESSID"] } {
set pl [persist lookup uie [HTTP::cookie "PHPSESSID"] ]
if { $pl ne "" } {
pool front member [lindex $pl 1] [lindex $pl 2]
} else {
log local.0 "Session ID [HTTP::cookie "PHPSESSID"] expired on the server for client [IP::client_addr]"
pool front
}
}
}
when LB_FAILED {
pool front
log local.0 "LB Failed for client [IP::client_addr]"
LB::reselect
}
when HTTP_RESPONSE {
if { [HTTP::cookie exists "PHPSESSID"] } {
set pl2 [persist lookup uie [HTTP::cookie "PHPSESSID"] ]
if { $pl2 ne ""} {
log local.0 "Existing Cookie PHPSESSID $pl2 generated by [IP::server_addr] and within persistance table
[lindex $pl2 1] [lindex $pl2 2] for client [IP::client_addr]"
}
persist add uie [HTTP::cookie "PHPSESSID"]
}
}Thanks for your help
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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