Forum Discussion
Is it possible to insert HTTP payload in an ICAP reply or to change the status code?
Maybe with TCP::collect could trigger the ADAPT response if I insert HTTP in the ICAP reply at the TCP level. Not a bad idea.
let me know how that goes!
- Nikoolayy1Dec 21, 2022MVP
Finally got some time to review this as if it is possible and seems not.
On the internal VS that connects to the ICAP server I tried to use TCP::respond and just it does not work in any event even CLIENT_ACCEPTED or SERVER_CONNECTED. The only way is to use the HTTP headers and the event ADAPT_REQUEST_HEADERS on the F5 standard VS.
when CLIENT_ACCEPTED {
set html_message "Access Denied"
TCP::respond "HTTP/1.1 405 Not Allowed Mime-Type: text/html\r\nCache-Control: no-cache,no-store\r\nConnection: close\r\nContent-Length: [string length $html_message]\r\n\r\n$html_message\r\n\r\n"
}
- Leslie_HubertusDec 27, 2022Ret. Employee
Well, dang. Are you trying other methods/paths, or giving up on this?
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