Hi, We have a virtual server which has four irules configured on it. The irule(irule) with the highest priority has a logic which would perform a HTTP::respond during the HTTP_REQUEST event with a status of 503 back to the client if the IP address matches one that is part of a configured blacklist of IPs specified in a datagroup. There is another irule(irule2) that is of lower priority that has a logic to remove a header and add it with a different value. HTTP::header remove testHeader HTTP::header add testHeader testvalue
What we are observing is that there are errors during the irule execution with stack trace as follows. 2014 Aug 8 11:48:54 server name local0 err err tmm1[4798]: 01220001:3: TCL error: irule2 - Operation not supported (line 1) invoked from within “HTTP::header remove “testHeader””
We have been looking at different threads in DevCentral and found the following links that were helpful.
We would like to know if performing drop after HTTP::respond in irule1 is a good practice. Additionally we would like to know what is the suggestion of a good practice for the solution in this scenario.
Hi - You just need to issue “event HTTP_REQUEST disable” to prevent further iRule processing.
I don’t think issuing a ‘drop’ after HTTP::respond would help - pretty sure you’d still get a TCL error, and in addition it might not send the response
There is another irule(irule2) that is of lower priority that has a logic to remove a header and add it with a different value. HTTP::header remove testHeader HTTP::header add testHeader testvalue
another approach is to move rule2 to HTTP_REQUEST_SEND event.