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 (...
Demonio_21719
Nimbostratus
Oct 10, 2015Hello, Now, it works correctly, but the elseif and else, returns to give the error "can not use non-numeric string as operand of" && "Definitely, how it could be better?
when CLIENT_ACCEPTED {
set collecting 0
set renegtried 0
set default_pool [LB::server pool]
}
when HTTP_REQUEST {
set uri [string tolower [HTTP::uri] ]
/_hst name and ?_hst=1 parameter triggers client cert renegotiation
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"
Collecting means buffering the request. The collection goes on
until SSL::renegotiate occurs, which happens after the HTTP
request has been received. The maximum data buffered by collect
is 1-4 MB.
HTTP::collect
set collecting 1
SSL::cert mode request
SSL::renegotiate
pool FIRST_POOL_SSL
SSL::enable serverside
log local0. "WITH FIRST POOL"
return
}
}
}
if { $uri equals "/extern/test.jsp" } {
pool FIRST_POOL_SSL
SSL::enable serverside
log local0. "WITH FIRST POOL"
} elseif { ([string tolower [HTTP::host]] eq "www.test.es") && ($uri eq "/abc") }{
HTTP::redirect "https://www.test.es/test1/"
} elseif { ([string tolower [HTTP::host]] eq "www.test.es") && ($uri contains "/") && ($uri) }{
HTTP::redirect "https://www.test.es[HTTP::uri]"
} else {
pool $default_pool
SSL::disable serverside
log local0. "WITH SECOND POOL"
}
}
Stanislas_Piro2
Cumulonimbus
Oct 10, 2015Hi,
I think the issue is : && ($uri)
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