Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 

iRules Can't call after responding - ERR_NOT_SUPPORTED (line 1) invoked from within "HTTP::host"

EricWu
Nimbostratus
Nimbostratus

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?

1 ACCEPTED SOLUTION

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

View solution in original post

3 REPLIES 3

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

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. 

REFhttps://clouddocs.f5.com/api/irules/HTTP__has_responded.html

 

Regards,
Dario.