60 Citrix NetScaler Policy Configuration and Reference Guide
5. In the HTTP Request Data or HTTP Response Data field, paste the
HTTP request or response that you want to parse with the expression, and
click Evaluate.
Note that you must supply a complete HTTP request or response, and the
header and body should be separated by blank line. Some programs that
trap HTTP headers do not also trap the response. If you are copying and
pasting only the header, insert a blank line at the end of the header to form a
complete HTTP request or response.
6. Click Close to close this dialog box.
Configuring Named Advanced Expressions
Instead of re-typing the same expression multiple times in multiple policies, you
can configure a named expression and refer to the name any time you want to use
the expression in a policy. For example, you could create the following named
expressions:
ThisExpression: http.req.body(100).contains("this")
ThatExpression: http.req.body(100).contains("that")
You can then use these named expressions in a policy expression. For example,
the following is a legal expression based on the preceding examples:
ThisExpression || ThatExpression
To configure a named advanced expression by using the NetScaler
command line
At the NetScaler command prompt, type:
add policy expression expressionName rule
Following is an example:
add policy expression advancedNamedExpression
"http.req.body(100).contains(\"the other\")"
The expression can be up to 1,499 characters.
To configure a named advanced expression by using the configuration
utility
1. In the navigation pane, expand AppExpert, and then click Expressions.
2. Click Advanced Expressions.
3. Click Add.
4. Enter a name and a description for the expression.