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 if the HTTP::Cookie will intercept this Set Cookie from the Server ????
If it is failing, how can I work around it ?
Here is what my Rule look like so far :
rule SESSIONID_one {
when HTTP_RESPONSE {
if { [HTTP::cookie exists "SESSIONID"] } {
set serv_cookie [persist lookup uie [HTTP::cookie "SESSIONID"] ]
if { $serv_cookie != ""} {
log local.0 "Cookie SESSIONID $serv_cookie already exists and generated by [IP::server_add] for client [IP::client_addr]"
}
persist add uie [HTTP::cookie "PHPSESSID"]
}
when HTTP_REQUEST {
if { [HTTP::cookie exists "SESSIONID"] } {
set pl [persist lookup uie [HTTP::cookie "SESSIONID"] ]
if { $pl ne "" } {
pool HTTP member [lindex $pl 1] [lindex $pl 2]
} else {
pool HTTP
}
}
}
}
Thanks for your response
Vincent