Forum Discussion
karthik_sriniva
Nimbostratus
Nov 30, 2005iRule return not working
I have the following iRule
when HTTP_REQUEST_SEND {
if ( <> } {
return
}
}
I want to present the request from getting to the backend server. But the return is not working. The request goes to the backend server.
Is thereway to prevent it
Thanks,
Karthik
- rapmaster_c_127Historic F5 AccountWell, rules are generally non-terminating with respect to the context of the connection, unless you explicitly stop the state-engine or divert it to another state - neither of which you have done here in your rule. Returning above just terminates the rule in this event handler and continues to the next state.
- karthik_sriniva
Nimbostratus
Thanks for your quick response. - unRuleY_95363Historic F5 AccountYou need to actually generate a response to the client though. This is what HTTP::respond would do. The "return" command simply finishes the rule processing, it doesn't actually do anything else. That is why rapmaster_c was recommending you to use something like: reject or HTTP::respond or HTTP::redirect. Those are actions that will cause the connection to the client to be completed and closed or reset.
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