Joe_Hsy_45207
Nov 20, 2007Nimbostratus
how to detect potential conflict with other iRule?
Hi,
We have a tool which uses iControl to dynamically add an iRule to a virtual server and it is important to ensure that the iRule we add do not conflict with existing iRules (or other iRules added later).
Specifically, if there is another iRule which calls HTTP::redirect or HTTP:respond at HTTP_REQUEST event, our iRule must not execute the HTTP_REQUEST block afterwards since our iRule makes a change to the HTTP header (which is not allowed after those two commands). Unfortunately, instead of a simple failure, this break the request and result in error showing at the client's browser.
We've used the priority to ensure that our HTTP_REQUEST block executes first (e.g. when HTTP_REQUEST priority 0 {...}) and that should work most of the time. However, if another iRule event block also has priority 0, there is still a chance for another iRule to get execute first.
Is there a way to know if HTTP::redirect or HTTP:Respond has already been called by another iRule, so that our iRule would simple skip execution?
Thanks!
//Joe