Occasional TCL Errors for HTTP::method ?

We use the following at the top of our main HTTP iRules:

-------------------

when RULE_INIT {

set sec_http_versions [list “0.9” “1.0” “1.1” ]

set sec_http_methods [list “GET” “POST” “HEAD”]

}

when HTTP_REQUEST {

if { ![matchclass [HTTP::version] equals $::sec_http_versions ] } {

reject

}

if { ![matchclass [HTTP::method] equals $::sec_http_methods] } {

reject

}

(rest of the iRule goes here)

}

--------------------

I’m pretty sure we snagged that from an F5 DevCentral newsletter awhile back.

Anyway, recently, we have started getting the following messages sporadically in the TMM logs:

=====================

Oct 16 01:01:30 tmm tmm[1120]: 01220001:3: TCL error: Rule poolpicker - Not found. Invalid server side API (line 1) invoked from within “HTTP::method”

Oct 16 07:35:31 tmm tmm[1120]: 01220001:3: TCL error: Rule poolpicker - while executing “HTTP::method”

Oct 16 12:30:50 tmm tmm[1120]: 01220001:3: TCL error: Rule poolpicker - while executing “HTTP::method”

=====================

Does anyone know what causes these errors? My best guess is corrupted packets, but the error is so generic I have no way to verify that. I couldn’t find much in the AskF5 KnowledgeBase either.

Thanks in advance,

Chip

I played around with your irule a little and had a little success with the following:

though I generally set this at the command prompt

example: bigpipe class valid_methods { \“CONNECT\” \“GET\” \“POST\” \“HEAD\” \“OPTIONS\” }

then set my call to it anywhere not needed to init in rule, but this is with your init in the rule

when RULE_INIT {

set sec_http_versions [ “0.9” “1.0” “1.1” ]

set sec_http_methods [ “GET” “POST” “HEAD”]

}

when HTTP_REQUEST {

if { not [matchclass [HTTP::version] equals $::sec_http_versions ] } {

reject

} elseif { not [matchclass [string toupper [HTTP::method]] equals $::sec_http_methods] } {

reject

}

(rest of the iRule goes here)

}