Forum Discussion
uni
Altostratus
Nov 21, 2006switch -nocase option not working
I can't get the -nocase option working in the switch statement. Am I doing something wrong, or isn't this supported? I'm using version 9.1.1.
[root@lsnetg-edu7:Active] sgun b merge -
rule test-rule {
timing on
when HTTP_REQUEST {
switch -nocase [HTTP::uri] {
"/aaa" { HTTP::respond 200 content "[HTTP::uri] : aaa\n" }
default { HTTP::respond 200 content "[HTTP::uri] : default\n" }
}
}
}
BIGpipe: rule modification error:
01070151:3: Rule [test-rule] error:
line 3: [invalid switch: "-nocase"] [-nocase]
- Alternately you could use it directly in the switch as well.
switch [string tolower [HTTP::uri]] { ...
- uni
Altostratus
Thanks people. In fact, I had been doing just what Joe suggests, but then noticed the -nocase switch in the doco.
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