Forum Discussion
rodrigo_Benzaqu
Nimbostratus
May 20, 2009Help to tune an Irule
Hi Guys, I have this rule to match contents on my site.
I want to simplify the rule to avoid extra cpu cycles.
rule Cache_fetch {
when HTTP_REQUEST {
s...
hoolio
Cirrostratus
May 21, 2009I'm pretty sure that the switch is already exited after the first match is found. If you don't need to check the query string in the URI, you could change HTTP::uri to HTTP::path so that you're only evaluating the requested object. It's shorter and should be more efficient than the full URI.
If you do stick with HTTP::uri and you're looking for a literal question mark, you should escape the ? with two backslashes. Else, when using the -glob flag the question mark is interpreted as any single character:
% string match test? "test1"
1
% string match test\? "test1"
1
% string match test\\? "test1"
0
% string match test\\? "test?"
1
Aaron
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