Hi- We’re getting a TCL error when we try to apply an iRule to parse this URL- https://www..com/.usec/loads
Here is the iRule:
when HTTP_REQUEST {
if {[findstr [HTTP::uri] “.usec/*” 6] } {
pool upgrades_443
}
else {
pool SSL_Web
pool Web
}
}
The BigIP bounces an error that says 'expected boolean value but got “” ’ We’re new to the iRule game. Does anybody have any suggestions?
Thanks!
Hi Tony -
Welcome aboard!
“if” expects a return value of True or False, but your findstr command returns the characters found. To use “findstr” in an if statement, you would need to do a comparison of the returned value to the expected value.
But if you’re trying to determine whether the URI contains the string “/.usec/”, the “contains” operator is probably what you are looking for:
if { [HTTP::uri] contains "/.usec/" }{
You might also want to take a closer look at your “else” clause: The first of the 2 “pool” statements will never take effect, since the 2nd will override it. Pick one, or add another condition to split the remaining traffic between those pools.
HTH
/deb
Thanks for your help! We were able to get this to work.
-Tony