Citrix Systems Network Router 9.2 User Manual
Chapter 3 Configuring Advanced Expressions: Getting Started
41
In this expression, the following is the operator component:
eq("text/html")
This operator causes the NetScaler to evaluate any HTTP requests that
contain a Content-Type header, and in particular, to determine if the value
of this header is equal to the string text/html.
contain a Content-Type header, and in particular, to determine if the value
of this header is equal to the string text/html.
•
<compound-operator> is a Boolean or arithmetic operator that forms a
compound expression from multiple prefix or prefix.operation elements.
compound expression from multiple prefix or prefix.operation elements.
For example, consider the following expression:
http.req.header("Content-Type").eq("text/html") &&
http.req.url.contains(".html")
Prefixes
An expression prefix represents a discrete piece of data. For example, an
expression prefix can represent an HTTP URL, an HTTP Cookie header, or a
string in the body of an HTTP POST request. An expression prefix can identify
and return a wide variety of data types, including the following:
expression prefix can represent an HTTP URL, an HTTP Cookie header, or a
string in the body of an HTTP POST request. An expression prefix can identify
and return a wide variety of data types, including the following:
•
A client IP address in a TCP/IP packet
•
NetScaler system time
•
An external callout over HTTP
•
A TCP or UDP record type
In most cases, an expression prefix begins with one of the following keywords:
•
CLIENT
: Identifies a characteristic of the client that is either sending a
request or receiving a response, as in the following examples:
•
The prefix client.ip.dst designates the destination IP address
in the request or response.
in the request or response.
•
The prefix client.ip.src designates the source IP address.
•
HTTP
: Identifies an element in an HTTP request or a response, as in the
following examples:
•
The prefix http.req.body(integer) designates the body of
the HTTP request as a multiline text object, up to the character
position designated in integer.
the HTTP request as a multiline text object, up to the character
position designated in integer.
•
The prefix http.req.header(
"
header_name
"
)
designates
an HTTP header, as specified in header_name.