ltm rule event HTTP RESPONSEΒΆ

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



HTTP_RESPONSE
       Triggered when the system parses all of the response status and header
       lines from the server response.

DESCRIPTION
       An iRule event triggered when the system parses all of the response
       status and header lines from the server response.

       Note: HTTP_RESPONSE is specific to a server response passing through
       the load balancer, and is not triggered for locally-generated responses
       (e.g. sent using the HTTP::respond command)

Examples
	when HTTP_RESPONSE {
	  if { [HTTP::status] contains "404"} {
	    HTTP::redirect "http://www.siterequest.com/"
	  }
	}


	when HTTP_RESPONSE {
	  HTTP::header insert SERVER_ADDRESS [IP::server_addr]
	  log "SERVER_ADDRESS [IP::server_addr]"
	}

	If the reject command is used in this event without HTTP::collect, the
	BIG-IP will forward the server generated headers to the client, then
	send a TCP RST segment. To send a RST without headers in response to a
	specific server response condition, execute HTTP::collect before
	reject, as in:

	when HTTP_RESPONSE {
	    if { [HTTP::status] == 404 } {
		HTTP::collect
		reject
	    }
	}

HINTS
SEE ALSO
CHANGE LOG
       @BIGIP-9.0.0 --First introduced the event.



BIG-IP				  2017-01-31			      iRule(1)