MattKirkevold_6
Jun 17, 2011Nimbostratus
iRule persitence on uri / payload
I am trying to set persistence using an iRule based on uri. The problem I think I might be having is related to the fact that the first uri that comes through does not contain the persistence string I want to use. When the iRule executes my page fails each time. this site does not use cookies
the url that contains my sessionid is as such - https://app.domain.com/AppName/con/...8346042343
where the 10.100.200.90.1308346042343 string is my sessionid
the iRule that I have in place (matches, but fails and kills my browser when used is
when CLIENT_ACCEPTED {
set add_persist 1
}
when HTTP_REQUEST {
set session_id [lindex [ split [HTTP::uri] "/" ] 3]
log local0. "Parsed a webapp sessionid as $session_id"
if { $session_id != "" } {
persist uie $session_id
}
}
A little more investigation I find that if I log the session to ltm I see the following sequence before my browser crashes and fails.
Jun 17 21:47:35 tmm tmm[1710]: Rule webapp-test2 : Parsed a webapp sessionid as
Jun 17 21:47:35 tmm tmm[1710]: Rule webapp-test2 : Parsed a webapp sessionid as 10.100.200.90.1308346445866
Jun 17 21:47:36 tmm tmm[1710]: Rule webapp-test2 : Parsed a webapp sessionid as 10.100.200.90.1308346445866
Jun 17 21:47:36 tmm tmm[1710]: Rule webapp-test2 : Parsed a webapp sessionid as 10.100.200.90.1308346445866
Jun 17 21:47:36 tmm tmm[1710]: Rule webapp-test2 : Parsed a webapp sessionid as 10.100.200.90.1308346445866
Interesting to note is that the first URI match is blank as it come from a dfferent pattern
https://app.domain.com/AppName/com?...tion=relay
and contains the session id in the body of the page itself
Jun 1HTTP/1.1 200 OK
8d
0
but does not contain the sessionid as being pull using the lindex split. Perhaps I need to throw that URL out somehow before capturing the string in the iRule, but how if so correct?
Any help is greatly appreciated