ltm rule command HTTP has respondedΒΆ

iRule(1)					  BIG-IP TMSH Manual					     iRule(1)

HTTP::has_responded
       Returns true if this HTTP transaction has been prematurely completed by an iRule command or other filter
       logic.

SYNOPSIS
       HTTP::has_responded

DESCRIPTION
       This can be triggered by HTTP::respond, HTTP::redirect, HTTP::retry, and some ACCESS commands.

       Syntax

       HTTP::has_responded

	    * Returns a true value if there is a previous command executed such as HTTP::respond.

RETURN VALUE
VALID DURING
       CACHE_REQUEST, CACHE_RESPONSE, HTTP_REQUEST, HTTP_REQUEST_DATA, HTTP_RESPONSE, HTTP_RESPONSE_CONTINUE,
       HTTP_RESPONSE_DATA

EXAMPLES
	when HTTP_REQUEST {
	  # Used for cases where only one response to the client is permitted.
	  # Another HTTP::respond might have been called in other iRULE script.
	  if {[HTTP::has_responded]} {
	    log local0. "Have already responded."
	  } else {
	    HTTP::respond 200 content {First and Only Response}
	  }
	}

HINTS
SEE ALSO
CHANGE LOG
       @BIGIP-14.0.0 --First introduced the command.

BIG-IP						      2020-06-23					     iRule(1)