For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

mika's avatar
mika
Icon for Cirrus rankCirrus
Sep 24, 2020

Can't call after responding - ERR_NOT_SUPPORTED invoked from within "HTTP::host"

Hello,

I have a problems in my IRules the redirections http to https.

In the logs LTM i have this error:

 Can't call after responding - ERR_NOT_SUPPORTED   invoked from within "HTTP::host"

 SO: the redirection don't work in some browser : for few minutes i get an error conexion reset.

Thanks for your feedback


BIG-IP 14.1.2.3

4 Replies

  • If the irule only makes the http to https better use the default F5 iRule _sys_https_redirect

    If not don’t forget the return in the line after the redirect and if you have that check if there are more than one iRule on the VS

    Also a good idea is to close the connection so I use most times

    HTTP::respond 302 noserver Location https://[HTTP::host][HTTP::uri]  Connection Close
     
    • mika's avatar
      mika
      Icon for Cirrus rankCirrus

      Thank you for your anser,

      this is the IRule who i used and i have alwayse the same problems with all hosts.

       

      when HTTP_REQUEST {

         

        if { [string tolower [HTTP::host]] contains "mysite.com"} {

           if {[HTTP::has_responded]}{return}

           #log local0. "[HTTP::host] [HTTP::uri]"

          HTTP::respond 301 Location "https://[HTTP::host][HTTP::uri]"

          regsub -all {:\d*$} [HTTP::host] "" host

           HTTP::redirect https://$host[HTTP::uri]

           return

        

        }

         

        }

       

      • Hi mika,

        Would you try using the "HTTP::has responded" line, before if statement?

        when HTTP_REQUEST {
        	if {[HTTP::has_responded]} { return }
        	
        	if {[string tolower [HTTP::host]] contains "mysite.com"} {
        		HTTP::respond 301 Location "https://[HTTP::host][HTTP::uri]"
        		return
        	}
        }
  • After a HTTP::respond or a HTTP::redirect must follow a return, both lines do more or less the same and F5 has a problem using the [HTTP::] values after a call like that