Forum Discussion
Demonio_21719
Nimbostratus
Oct 09, 2015Can't use non-numeric string as operand of "&&" in rule
Hello. When this irule runs the following error occurs:
/Common/SSL_Test - can't use non-numeric string as operand of "&&" while executing "if { $renegtried == 0 and [SSL::cert count] == 0 and (...
VernonWells
Employee
Oct 10, 2015Depends on to what the elseif is attached. Does it apply only when one of the three URI paths are matched? If not, you could place a return in the existing match clause, then put your if...else outside the switch, like so:
when HTTP_REQUEST {
switch [HTTP::uri] {
"/extern/test.jsp" -
"/SO/services/dat" -
"/Ex/services/pay" {
if { !$renegtried && [SSL::cert count] == 0 } {
log local0. "[IP::client_addr]:[TCP::client_port]: A log entry"
HTTP::collect
SSL::cert mode request
SSL::renegotiate
return
}
}
}
end up here if none of the three URI paths above match, or if one of them does match
but either $renegtried or SSL::cert count != 0
if { [string tolower [HTTP::host]] equals "www.test.es" } {
pool SECOND_POOL_SSL
SSL::enable serverside
log local0. "WITH SECOND POOL"
} else {
pool THIRD-POOL-SSL
SSL::disable serverside
log local0. "WITH THIRD POOL POOL"
}
}
For test of HTTP::host using string tolower is important, because the client may submit the Host: header in any case, and DNS is case indifferent.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects