Forum Discussion
For me even with HTTP 1.1 this worked if the icap server returns HTTP data to trigger the "ADAPT_REQUEST_RESULT" event. The trick is in HTTP_RESPONSE_RELEASE to do a a redirect for example HTTP::respond 302 Location "http://www.domain.org" and this works (you can't have HTTP body in the event but HTT Headers are no problem 😎 ), you just need to host the web pages and it could on the same F5 VS if you add HTTP::uri condition in the HTTP_REQUEST event.
My issue was that if the ICAP server returns only ICAP data and no HTTP data then how trigger custom response page but it is not possible but for your issue there is a workaround.
Hello Nikoolayy1
Indeed, your problem and mine are different.
As I wrote HTTP::respond is not supported in HTTP_RESPONSE_RELEASE. Even if it looks to work, it shouldn't. I edited my previous post to add link for documentation where you can find the info.
Sad thing is the F5 doesn't trigger an error when writing the iRule with this command, while it does if I use HTTP::redirect e.g..
The best place would be in the ICAP_REPONSE event, see https://clouddocs.f5.com/api/irules/ICAP_RESPONSE.html, but I didn't yet found the way to modify the payload here.
- Nikoolayy1Jan 11, 2023MVP
From my talks with support when they say HTTP::respond is not supported in HTTP_RESPONSE_RELEASE is actually that you can't add or modify the HTTP body, so adding HTTP header to redirect works as it is not part of the body.
About "The best place would be in the ICAP_REPONSE event" yup as I tested with TCP::respond it just does not work and you can't use HTTP::respond in an icap event so I gave up 😀