Forum Discussion
ICAP with iRule Response Page without ASM
Hi Bicham,how you fixed it?
- MS_273769Jul 25, 2016
Nimbostratus
Hi Bicham I am having exactly the same problem and have also updated the F5 firmware to 11.6.1 but it is not allowing me to use HTTP_RESPONSE_RELEASE. Could you please share some knowledge how you fixed it. Thanks in advance.
Cheers MS
- boneyardJul 25, 2016
MVP
Bicham doesn't seem to have logged in since 2015, how doesn't the F5 allow you to use HTTP_RESPONSE_RELEASE?
- MS_273769Jul 26, 2016
Nimbostratus
when i try to configure following i receive the following error message:
when HTTP_RESPONSE_RELEASE { if { $VirusDetected == 1 } { HTTP::redirect "http://10.101.10.1:4713/files/attachment_blocked.html"
} }Error Message:
01070151:3: Rule [/Axx-xx-EXTRANET/_ICAP_nonprod_redirect_request_adaptaion] error: /Axx-xx-EXTRANET/xx_ICAP_nonprod_redirect_request_adaptaion:22: error: [command is not valid in current event context (HTTP_RESPONSE_RELEASE)][HTTP::redirect "http://10.101.10.1:4713/files/attachment_blocked.html"]
- Vijay_JainJun 11, 2019
Altostratus
I tried the same on 13.1.1 and got the same error. Is this fix for you?
- MS_273769Jul 26, 2016
Nimbostratus
would this iRule work when a virus is detected with http-redirect:
when HTTP_REQUEST { set VirusDetected 0 set IsAdaptEnabled 0 if { !([HTTP::method] == "POST" && [HTTP::uri] contains "wd_key") } { ADAPT::enable disable log local0. "Version5: Adapt Disabled URI is [HTTP::uri] Host is [HTTP::host]" } else { ADAPT::enable enable log local0. "Version5: Attachment Detected - Adapt is Enabled. URI is [HTTP::uri] Host is [HTTP::host]" } } when ADAPT_REQUEST_RESULT { log local0. "result is [ADAPT::result]" if {[ADAPT::result] contains "respond"} { set VirusDetected 1 } } when HTTP_RESPONSE_RELEASE { if { $VirusDetected == 1 } { HTTP::redirect "http://10.101.10.1:4713/files/attachment_blocked.html"
} } - boneyardJul 26, 2016
MVP
i added a comment to this yesterday but it got lost it seems.
 
if you check the wiki page for HTTP_RESPONSE_RELEASE it states that both HTTP::redirect and HTTP::response aren't allowed in it.
 
https://clouddocs.f5.com/api/irules/HTTP-RESPONSE-RELEASE.html
 
not sure why Bicham got his information from but i tested also in 11.6.1, 12.0 and 12.1 an in neither this works.
 
- Kai_KatajaAug 11, 2016
Altostratus
Thanks MS, your code works! It was a precious starting point for us.
- boneyardAug 13, 2016
MVP
so you can do a HTTP::redirect in HTTP_RESPONSE_RELEASE?
which version is that?
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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