ltm rule command ADAPT result
iRule(1) BIG-IP TMSH Manual iRule(1)
ADAPT::result
Sets or returns the adaptation result code.
SYNOPSIS
ADAPT::result (ADAPT_CTX)? (ADAPT_SIDE)? ('bypass' | 'close' |
'abort')?
DESCRIPTION
The ADAPT::result command sets or returns the adaptation result code of
the ADAPT filter on the current or specified side of the virtual server
connection for which the iRule is being executed.
Possible result codes are:
* unknown - The internal virtual server has not returned a
result yet. It is not possible to change the result code
to this value.
* bypass - The internal virtual server does not need to modify
the request or response. If the iRule sets this value, ADAPT
immediately goes into a bypass mode where it does not send
any more payload to the IVS and gnores any further payload
returned from the IVS. Any payload in a preview buffer is
first replayed to the HTTP destination (server or client),
but if there is no preview or it has been dropped, any payload
previously sent to the IVS is lost. In some use-cases that is
OK because the IVS response will be replaced by an iRule that
overrides that response. Whenever bypass mode is engaged while
there is outstanding payload not buffered in a preview, that
might have been lost, a warning message is logged.
Prior to Big-IP version 13.0, ADAPT would abort the HTTP
connection when payload could might be lost. From 13.0 on,
the HTTP connection is not aborted and the user has the
opportunity to handle the situation via iRules.
It is recommended that bypass mode only be set by an iRule
when the entire payload from the IVS is to be replaced.
* modify - The internal virtual server is modifying the request
or result. It is not possible to change the result code to
this value.
* respond - (request-adapt only) The internal virtual server is
returning a HTTP response for the provided HTTP request. It
is not possible to change the result code to this value.
* close - The adaptation server closed the connection before
receiving an answer. The adaptation profile will respond
to this state as directed by the service-down-action
mode. Changing the result code to this value will force
the service_down_action to be applied.
* reset - The connection with the adaptation server was reset
before receiving an answer. The adaptation profile will
respond to this state as directed by the service-down-action
mode. It is not possible to change the result code to
this value.
* timeout - A timeout occurred before the adaptation server
was reset before receiving an answer. The adaptation
profile will respond to this state as directed by the
service-down-action mode. It is not possible to change the
result code to this value.
Syntax
ADAPT::result []
* Gets the result code for the current side
ADAPT::result [] request
* Gets the result code for the request-adapt side
ADAPT::result [] response
* Gets the result code for the response-adapt side
ADAPT::result []
* Sets the result code for the current side
ADAPT::result [] request
* Sets the result code for the request-adapt side
ADAPT::result [] response
* Sets the result code for the response-adapt side
The optional argument applies the command to a specific
context. Useful when there are dynamic contexts. If "request" or
"response" is specified, the context must be on the appropriate side
(client or server, respectively).
RETURN VALUE
Returns the current or modified result code.
VALID DURING
ADAPT_REQUEST_RESULT, ADAPT_RESPONSE_RESULT
EXAMPLES
when ADAPT_REQUEST_RESULT {
if {[ADAPT::result] == "respond"} {
# Force ADAPT to ignore any direct response from IVS
# (contrived example, probably not useful as-is).
ADAPT::result bypass
}
}
HINTS
SEE ALSO
CHANGE LOG
@BIGIP-11.3.0 --First introduced the command.
BIG-IP 2017-01-31 iRule(1)