Fortinet white logo
Fortinet white logo

Script Reference Guide

HTTP:header_get_values(header_name)

HTTP:header_get_values(header_name)

Returns a list of value(s) of the HTTP header named <header_name>, with a count for each value. Note that the command returns all the values in the headers as a list if there are multiple headers with the same name.

Syntax

HTTP:header_get_values(header_name);

Arguments

Name Description

Header_name

A string which specifies the header name.

Events

Applicable in the following events:

  • HTTP_REQUEST

  • HTTP_RESPONSE

  • AUTH_RESULT

Example

when HTTP_REQUEST {
cookies=HTTP:header_get_values("Cookie")
for k, cnt in pairs(cookies) do
debug("initially include cookie %s cnt %d\n", k, v)
end
}

Supported Version

FortiADC version 4.3.x and later.

HTTP:header_get_values(header_name)

HTTP:header_get_values(header_name)

Returns a list of value(s) of the HTTP header named <header_name>, with a count for each value. Note that the command returns all the values in the headers as a list if there are multiple headers with the same name.

Syntax

HTTP:header_get_values(header_name);

Arguments

Name Description

Header_name

A string which specifies the header name.

Events

Applicable in the following events:

  • HTTP_REQUEST

  • HTTP_RESPONSE

  • AUTH_RESULT

Example

when HTTP_REQUEST {
cookies=HTTP:header_get_values("Cookie")
for k, cnt in pairs(cookies) do
debug("initially include cookie %s cnt %d\n", k, v)
end
}

Supported Version

FortiADC version 4.3.x and later.