Forum Discussion
jakk127_200290
Nimbostratus
May 01, 2015Trying to understand using square braces vs parenthesis in iRules
Hello,
I have an written the following iRule
when HTTP_REQUEST {
set user_agent [string tolower [HTTP::header User-Agent]]
if { not ($user_agent contains "windows nt 5.1")} {
vi...
kunjan
Nimbostratus
May 01, 2015if { not [$user_agent contains "windows nt 5.1"]}
The square bracket is considered as command which is executed when the iRule runs. Since it is an invalid command, it generates TCL error and TCP resets. /var/log/ltm logs should have the error that the iRule throws. Hope that explains.
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