Forum Discussion
Chris_Miller
Altostratus
Aug 17, 2010"Event Disable"
I have my LTM checking to see whether a certain cookie exists as part of the HTTP_REQUEST event. If the cookie does exist, I don't need to insert a cookie in the HTTP_RESPONSE event.
Current...
hoolio
Cirrostratus
Aug 18, 2010If you wanted to selectively run HTTP_RESPONSE depending on whether some condition is true in HTTP_REQUEST, you could explicitly disable/enable HTTP_RESPONSE in all cases from HTTP_REQUEST.
If you disable HTTP_REQUEST, you do need to worry about that event not being triggered on subsequent requests on the same TCP connection. In general, I don't like disabling events as it would affect all other iRules. It would be a significant pain to be troubleshooting why a new iRule on an existing virtual server doesn't work as expected when another rule on the same virtual server is disabling some of the events. I think it's cleaner to set local variables to track whether iRule code in other events should be evaluated. It's probably slightly less efficient to use this method, but more friendly to yourself and other admins in the future.
Aaron
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
