Leslie_South_55
Nov 06, 2006Nimbostratus
Persist with multiple cookies
I have posted this question in an older thread, but I thought I would start a new one to see if I can get any bites.
I have the need to persist to weblogic servers using 1 of any 5 cookies, including a JESSIONID. After doing some tcpdumps, it appears that the client web browser can present any of 5 cookies sent by the web server, 3 of which are session based and 2 that have expiration dates.
I am currently only persisting using an iRule for JSESSIONID; this works until the client presents one of the other cookies.
when HTTP_RESPONSE {
set key [HTTP::cookie "JSESSIONID"]
set value [IP::server_addr]:[TCP::server_port]
if {$key != ""} {
log local0. "Adding jsess of: $key, value of: $value"
session add uie $key $value
set value2 [session lookup uie $key]
log local0. "Re-looking up key: $key, provides value: $value2"
}
}
when HTTP_REQUEST {
set jsess [findstr [HTTP::uri] "jsessionid" 11 ;]
log local0. "Entering REQUEST, jsess is: $jsess"
if { $jsess != "" } {
set server [session lookup uie $jsess]
log local0. "Server IP is: $server"
if { $server != "" } {
pool pool_weblogic_pool_http member $server
}
}
}
using the above rule which was posted in an older thread.
How can I, using an iRule, allow persistence on what ever cookie is presented?