I have a complex iRule performing redirection based upon multiple criteria.
I am using HTTP Class Profiles, however, as a first instance, to perform initial redirection, and to execute ASM policies.
I need traffic which is matched by the HTTP Class profile, to NOT be subject to the iRule checks. However, I cannot use the “when HTTP_CLASS_FAILED” event, becuase I am matching on HTTP::uri and HTTP:path, which dont appear to be supported.
Is there another way of doing this?
Could I call up another iRule from this iRule, I guess again, this wont be supported by the When HTTP_CLASS_FAILED event…?
I think this is a bug in the validation logic applied to iRules for HTTP_CLASS_SELECTED and HTTP_CLASS_FAILED. The HTTP::path and HTTP::uri commands will work fine in both of these events--it’s just the validator which prevents them from being referenced.
You can hide the HTTP:: commands from the validation by using the eval command:
when HTTP_CLASS_FAILED {
Hide [HTTP::path] from the validator
set path_cmd "HTTP::path"
Get the value of HTTP::path
set path [eval $path_cmd]
}
$path will then hold the HTTP::path output.
You could open a case with F5 Support to request this be fixed in a future version.