ltm rule command ICAP header
iRule(1) BIG-IP TMSH Manual iRule(1)
ICAP::header
Sets or returns ICAP attributes in the ICAP header.
SYNOPSIS
ICAP::header 'names'
ICAP::header 'at' HEADER_INDEX
ICAP::header 'count' (HEADER_NAME)?
ICAP::header 'exists' HEADER_NAME
ICAP::header ('remove' | 'values') HEADER_NAME
ICAP::header ('replace' | 'add') HEADER_NAME HEADER_VALUE
ICAP::header 'replace-all' HEADER_TEXT
ICAP::header 'value' HEADER_NAME (HEADER_VALUE)?
DESCRIPTION
The ICAP::header command sets or returns attributes in the ICAP header.
Syntax
ICAP::header exists
* Returns true if header exists and is not empty.
ICAP::header values
* Returns all values of the specified ICAP header .
If there is only one header of this name, returns its value.
If there are multiple headers with the same name, returns a
Tcl list of the values.
ICAP::header value []
* Returns the value of the last ICAP header ,
that is the value of the last occurrence of that attribute.
Optionally replaces that value with the supplied new value.
ICAP::header names
* Returns a list of the names of all ICAP headers present.
ICAP::header count []
* Returns the number of ICAP headers present.
Optionally returns the number of headers named .
ICAP::header at
* Returns the ICAP header name at the zero-based
position. Index 0 refers to the first header.
ICAP::header replace
* Replace the specified ICAP header attribute with the provided
value.
ICAP::header remove
* Remove the specified ICAP header attribute
ICAP::header add
* Adds the specified ICAP header attribute
ICAP::header replace-all
* Replace the current ICAP header with the provided text
Used primarily to add custom headers specific to the application.
If modifying standard ICAP headers, be careful that the resulting
ICAP headers make sense to the ICAP server and do not misrepresent
the behavior of the BigIP ICAP client. For example, DO NOT do this:
ICAP::header add Allow 204
(the server would be misled to believe the BigIP client can accept
a 204 response after resuming payload beyond the preview).
RETURN VALUE
VALID DURING
ICAP_REQUEST, ICAP_RESPONSE
EXAMPLES
when ICAP_REQUEST {
ICAP::header add X-ICAP-my-custom-header foobar
}
when ICAP_RESPONSE {
ICAP::header remove X-ICAP-my-custom-header
}
HINTS
SEE ALSO
CHANGE LOG
@BIGIP-11.3.0 --First introduced the command.
BIG-IP 2017-01-31 iRule(1)