Forum Discussion

Tony_Drane_9358's avatar
Tony_Drane_9358
Icon for Nimbostratus rankNimbostratus
Jul 27, 2006

Expected Boolean Value Error

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!

2 Replies

  • Deb_Allen_18's avatar
    Deb_Allen_18
    Historic F5 Account
    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