Michael_Benzing
Jan 26, 2014Nimbostratus
Syntax of "switch" statement
I have seen some switch statements in our F5 rules that seem to be using "else" instead of the "default" keyword to catch all unmatched searches. Based on documentation, it would seem to me that the interpreter would merely attempt to match the string to "else" and fail instead of performing default action. My question is, is this an undocumented feature that works as the default keyword in F5? In other words, how does the interpreter treat the "else" statement in the example below?
when HTTP_REQUEST { switch -glob [HTTP::uri] { somesvc { drop } /mysvc* {pool my_pool_10010} / {redirect to https://somewhere.else.com/their_service} else { drop } } }