Instruction manual
Appendix A: Policy Expressions
NetScaler 9000 Series Installation and Configuration Guide - Volume 1 A-13
NSICG60_JAN05
When any expression is evaluated as being true, it returns a pointer to a buffer
that contains the content and is then used with any of the rule controlled
activities. Table I-2 defines the default behavior of what the buffer contains
for combinations of qualifier and operator:
The length and offset parameter are then applied to the default buffer. All
other expression data is considered undefined, and should be set to NULL
even in the case of a TRUE evaluation. The evaluation on compound
expressions is done in a lazy way, so given the expression (true || false || true ),
the buffer will be returned from the first expression, even though the last
expression would also evaluated as true. Given the expression ((true &&
true) || true), the buffer value from the second expression would be returned.
Finally, given the following expressions:
add policy expression jsession_url "URL CONTAINS
jsessionid= -length 6 –offset 2"
add policy expression jsession_query "URLQUERY CONTAINS
jsessionid= -length 6 –offset 2"
add policy expression jsession_cookie "HEADER Cookie
CONTAINS jsessionid -length 6 –offset 2"
Table 0-2. Combination of qualifiers and operators and contents of
the resultant buffer
Qualifier and
Operator
Buffer Contains
URL CONTAINS Data from the point where the string matches to the
end of URL.
URL CONTENTS The entire URL.
HEADER
CONTAINS
Data from the point where the string matches to EOL.
HEADER
CONTENTS
The entire header, including the header name.
URLQUERY
CONTAINS
URLQUERY
CONTENTS
Data from the point where the string matches.
The entire query, excluding the ? and trailing white
space.