marlon_Gino-gi1
Jan 13, 2007Nimbostratus
irule based on JSESSIONID cookie
hello Guys,
Im quite new with Irules, would just like to know how the irules below works.As per my understading the rules below will apply persistence if the JSESSIONID cookie exist. i would like to know if the client connects without the JSESSIONID, what will happen to the connection based on the irule below.
thanks in advance
when CLIENT_ACCEPTED {
set add_persist 1
}
when HTTP_RESPONSE {
if { [HTTP::cookie exists "JSESSIONID"] and $add_persist } {
persist add uie [HTTP::cookie "JSESSIONID"]
set add_persist 0
}
}
when HTTP_REQUEST {
if { [HTTP::cookie exists "JSESSIONID"] } {
persist uie [HTTP::cookie "JSESSIONID"]
} else {
set jsess [findstr [HTTP::uri] "jsessionid" 11 ";"]
if { $jsess != "" } {
persist uie $jsess
}
}
}