Forum Discussion
jrok_47156
Nimbostratus
Aug 30, 2012HTTP::uri equality question
This may be a very simple question but I have looked for a few hours now and cannot find a good answer.
Why does this work?
switch [HTTP::uri] {
"/maintenance" { ...
Michael_Yates
Nimbostratus
Aug 30, 2012Hi jrok,
The switch statment is a literal string compare. Pretty much the same as "equals".
The "==" is an absolute comparison which is normally reserved for number value comparisons and in your case it has to convert the "/maintenance" to a string since it is not a number and then perform a string compare (extra work and less efficient).
I have no idea why you would be getting an SSL connection reset. I've never seen that problem before in a compare like this, but to answer your other question, yes, there are other comparisons that you can do within an if statement.
starts_with
ends_with
contains
equals
Hope this helps.
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