Forum Discussion
Jeff_McCombs_10
Nimbostratus
Mar 12, 2006methods/funcs & string case
Hey gang,
Trying to convert a bunch of 4.x rules into 9.x. Thank god I'm decent in Tcl. Shouldn't be too hard to do the conversion, tho it will be extremely tedious!
My question is, does anyone know if the iRules convert case? In HTTP::method, or HTTP::uri and others, is the output converted to uppercase or lowercase? or is it a best practice to do this by hand?
e.g.
if { [HTTP::method] == "TRACE" || [HTTP::method == "TRACK" || [HTTP::method == "SEARCH" } {
discard
}
or would it be better to:
if { [string toupper [HTTP::method]] == "TRACE" || [string toupper[ HTTP::method]] == "TRACK" || [string toupper [HTTP::method]] == "SEARCH" } {
discard
}
Thanks.
-J
- JRahm
Admin
The case will not be changed unless you make it so, as you have done with your second example.
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