Forum Discussion
How do I make an iRule read each connection?
Excellent, glad to help. The other thing I should have mentioned is variables use the same scope across all events for that TCP connection, so for hostredirect, it will look like this... (assumes disable commands were removed)
TCP connection open
HTTP request
HTTP request (match! hostredirect=123)
HTTP request (no match)(hostredirect=123)
HTTP request (no match)(hostredirect=123)
HTTP request (match)(hostredirect=234)
HTTP request (nomatch)(hostredirect=234)
HTTP request (nomatch)(hostredirect=234)
TCP connection closed
So be mindful that HTTP_REQUEST events can be triggering multiple times per connection and their variables may have already been set from a previous match. Even if they don't match this time around the variable may still be set that way from a previous iteration. Watch out for variable poisoning from a previous run through of your HTTP_REQUEST events.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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