Forum Discussion

lbong_53781's avatar
lbong_53781
Icon for Nimbostratus rankNimbostratus
Sep 01, 2009

Route to different pool base on cookie detected

Hi,

 

 

Below is my iRule and I run into issue where it seems that the iRule only looks at the last cookie.

 

 

If I have multiple cookie in the header and the last cookie in the header is not test_a, the rule below will not work.

 

 

if (exists http_cookie("test_a") and http_cookie("test_a") contains "1") {

 

use pool test_a_1_Pool

 

}

 

else {

 

if (exists http_cookie("test_a")) {

 

use pool test_a

 

}

 

else {

 

use pool regular_pool

 

}

 

}

 

 

Thanks for any help or pointer.

 

 

  • To follow up with my question. Basically, there are multiple cookie headers in the http header . Will the BigIP http_cookie statement read/evaluate the last "Cookie: " statement only ?

     

     

    Thanks.