Forum Discussion
iRules Can't call after responding - ERR_NOT_SUPPORTED (line 1) invoked from within "HTTP::host"
Hi,
I tried to write a irule that can response code 200 and some contenet when the query string matched.
But I found the error log as below :
TCL error: /Common/fz_stg_base <HTTP_REQUEST> - Can't call after responding - ERR_NOT_SUPPORTED (line 1) invoked from within "HTTP::host"
My irules as below :
when HTTP_REQUEST {
switch -regexp [HTTP::query] {
"jsonp=NetTestCallback[0-8]&.+" {
HTTP::respond 200 content "Hello World!!"
}
}
}
/Common/fz_stg_company irule as below :
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::host]] {
"a.bc.xyz" {pool my_pool}
}
}
My irules on the top order and fz_stg_company on the second order.
Any idea?
Yes, you should disable evulation of the other iRule when the HTTP::respond is triggered in the first iRule. For more information see: https://clouddocs.f5.com/api/irules/event.html and this post: https://community.f5.com/t5/technical-articles/irules-disabling-event-processing/ta-p/277009
Yes, you should disable evulation of the other iRule when the HTTP::respond is triggered in the first iRule. For more information see: https://clouddocs.f5.com/api/irules/event.html and this post: https://community.f5.com/t5/technical-articles/irules-disabling-event-processing/ta-p/277009
- EricWuNimbostratus
Hi Niels,
Thanks for your reply.
It's work normally!!
BTW, since v14 there is a special command to check if a response was executed.
REF - https://clouddocs.f5.com/api/irules/HTTP__has_responded.html
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