Forum Discussion
John_LeMay_1062
Nimbostratus
Sep 27, 2006Combining http_request and client_accepted?
I'm working on putting together what I think will be a relatively complex rule - at least it will be for me. So far my irule experience been limited to uri rewrites and redirects. However, I now have ...
hoolio
Cirrostratus
Sep 27, 2006Hi,
The CLIENT_ACCEPTED event is triggered when a TCP connection is established (or UDP packet received?). It can be used for TCP (or UDP) level commands. The HTTP_REQUEST event is triggered when an HTTP profile is associated with the VIP and an HTTP request is received. It can be used for TCP (or UDP) and HTTP level commands.
If you want to inspect the HTTP content (the URI) you should associate an HTTP profile on the VIP and use HTTP_REQUEST. In general, I think the only reason you would use CLIENT_ACCEPTED instead of HTTP_REQUEST is if you don't want the overhead of having TMM parse the HTTP and are just using lower layer functionality like making decisions based on the IP address or ports involved in the request.
You can change the URI using 'HTTP::uri /new/uri'. You can send a redirect to using 'HTTP::redirect https://myhost/redirected.html'. TMM handles the port translation from what the client requested to the port of the node, if you have port translation enabled on the VIP.
Aaron
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
