lbong_53781
Oct 02, 2009Nimbostratus
HTTP::COOKIE not working as expected
I am running LTM 10.0.1
I have the following iRule and run into some issues when there are multiple cookie variable in the header. The Rule seems to only look at the last "Cookie:" variable in the header. If "My_Cookie" is the last cookie statement in the header, it will work. But if its not, it will not see "My_Cookie".
when HTTP_REQUEST {
if {[HTTP::cookie exists "My_Cookie"]} {
if {[HTTP::cookie "My_Cookie"] equals "1"} {
use pool My_Pool
} else {
use pool My_Pool_2
}
} else {
use pool Other_Pool
}
}
I tried to send the following to the F5 to test the rule.
do echo && echo -n "$number ";GET -Ssed -H 'User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 (.NET CLR 3.5.30729)' -H 'Cookie: TID=5555%2D51020900262051001033859%2D0' -H 'Cookie: My_Cookie=1' -H 'Cookie: CHOSEN_BANNER=1' -H 'Host: mysite.com' http://mysite.com/?test=$number