Forum Discussion
Robert_Sherrard
Nimbostratus
Jun 02, 2006Valid iRule for SOAPAction?
I'm looking to direct traffic based on find SOAPAction in a header... if the SOAPAction contains getWMRM... would this work?
when HTTP_REQUEST {
if { [matchclass [HTTP::header SOAPAction] contains "getWMRM"] } {
pool place_pool_here
}
else {
pool place_pool_here
}
}
Rob
5 Replies
- Colin_Walker_12Historic F5 AccountAssuming that "SOAPAction" is a valid header in your HTTP request, you wouldn't even need the matchclass section.
Your code would be as simple as:if { [string tolower [HTTP::header SOAPAction] ] contains "getwmrm" } { pool stringFound_pool } else { pool NotFound_pool }
HTH,
Colin - Robert_Sherrard
Nimbostratus
ok thanks for the input...
Rob - Robert_Sherrard
Nimbostratus
One question...
What's "tolower" doing?
Rob - Colin_Walker_12Historic F5 AccountThe string tolower command is just a variant of the string command, which is a TCL command that allows for matching/altering string patterns.
In this case, by using the "tolower" option, the rule is doing a case insensitive comparison.
Colin - Colin_Walker_12Historic F5 AccountOh, by the way, there's a great set of documentation for TCL in general over at sourceforge: Click here.
You can read more about the string command in particular in their section on it here: Click here
HTH,
Colin
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