EricWu
Apr 22, 2022Nimbostratus
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