Jeff_McCombs_10
Mar 12, 2006Nimbostratus
methods/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