Forum Discussion
Robert_47833
Nov 14, 2011Altostratus
how to use switch to match datagroup
1:there is a datagroup:cjj
how to use switch to match this group
switch -glob [HTTP::path] {
"cjj" xxxx ???
2:
switch -glob [HTTP::path] { "*jpg" - "*bmp" - ...
Robert_47833
Nov 19, 2011Altostratus
Hi,Aaron
in this case
Example using no variable as [HTTP::path] is cached:
switch -glob [HTTP::path] {
"*gif" -
"*png" {
switch -glob [HTTP::path] {
"/static.*" -
"/s.*" {
switch -glob [HTTP::path] {
"*cswebtool*" -
"*cobrands*" {
persist none
pool SRWD52-STATIC
return
}
}
}
}
}
}
because [HTTP::path] is cached,so we don't need to set variable.
hmm,if I set uri [HTTP::path],it means every connection we have $uri and [HTTP::path] in memeory,right?(I am not sure this cached stuff can be used by other connection.)
so it is better not to use set uri [HTTP::path] to cache output of [HTTP::path] again,right?
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