Forum Discussion
Can we use HTTP::Respond commmand in ADAPT_REQUEST_RESULT event?
Can we use HTTP::Respond command in ADAPT_REQUEST_RESULT event?.
- Simon_Blakely
Employee
No - HTTP::Respond is invalid in that context.
What is the problem you are trying to solve?
- Srinath_K_S
Altostratus
Thanks for your reply.This is for an virus scanning solution, where in irule based on the scan status code response from ICAP server we perform different actions. For an error code we are trying to respond with a sorry page using HTTP::respond 302.
Please suggest if there is any alternative.
- Simon_Blakely
Employee
In HTTP_RESPONSE_RELEASE you can examine the HTTP::status and change the response with an HTTP::respond
when HTTP_RESPONSE_RELEASE { if {[HTTP::status] == 307} { HTTP::respond 403 content "<HTML><HEAD><TITLE>Access Denied</TITLE></HEAD><BODY>VIRUS FOUND.</BODY>\n } }
This irule changes the ICAP server response from a 307 Temporary Redirect to a 403 static error page.
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