is this applicable?
by the way, do you know starting from 9.4.4 $:: prefix is no longer required to reference class object and it is cmp compatible?
CMP Compatibility
https://devcentral.f5.com/wiki/iRules.cmpcompatibility.ashx
[root@ve1024:Active] config b virtual bar list
virtual bar {
snat automap
pool foo
destination 172.28.19.79:80
ip protocol 6
rules myrule
profiles {
http {}
tcp {}
}
}
[root@ve1024:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
log local0. "[HTTP::uri]"
log local0. "[string map {%20 ""} [HTTP::uri]]"
log local0. "[string tolower [URI::query [string map {%20 ""} [HTTP::uri]] id]]"
if {[matchclass [string tolower [URI::query [string map {%20 ""} [HTTP::uri]] id]] contains $::Portlet_ref]} {
log local0. "gotcha"
} else {
log local0. "not match"
}
}
}
[root@ve1024:Active] config b class Portlet_ref list
class Portlet_ref {
"hello"
}
/var/log/ltm
Jun 26 22:58:29 local/tmm info tmm[4861]: Rule myrule : /test?id=%20he%20llo%20&temp=1234
Jun 26 22:58:29 local/tmm info tmm[4861]: Rule myrule : /test?id=hello&temp=1234
Jun 26 22:58:29 local/tmm info tmm[4861]: Rule myrule : hello
Jun 26 22:58:29 local/tmm info tmm[4861]: Rule myrule : gotcha