Citrix Systems Network Router 9.2 User Manual

Page of 302
Chapter 4        Advanced Expressions: Evaluating Text
67
HTTP.REQ.HEADER("Example").AFTER_REGEX(re/more/)
For more information on regular expressions, see 
.
Expression Prefixes for Text
The following sections discuss expression prefixes for strings. 
Expression Prefixes for Text in HTTP Requests 
and Responses
An HTTP request or response typically contains text, such as in the form of 
headers, header values, URLs, and POST body text. You can configure 
expressions to operate on one or more of these text-based items in an HTTP 
request or response.
The following table describes the expression prefixes that you can configure to 
extract text from different parts of an HTTP request or response.
HTTP Expression Prefixes that Return Text
Prefix
Description
HTTP.REQ.BODY(integer)
Returns the body of an HTTP request as a multiline text 
object, up to the character position designated in 
integer
There is no maximum value for the body argument, but 
you should use as small a value as is practical. Larger 
values can affect performance.
Note: Although it is possible to specify this prefix 
without an integer argument, this usage is deprecated.
HTTP.REQ.HOSTNAME
Returns the HTTP host name in the first line of the 
request, if there is one. Otherwise, this prefix returns the 
value in the last occurrence of the HOST header.
Note that there are two similar prefixes that return host 
names, as follows:
• http.req.url.hostname only returns the 
host name from the URL
• http.req.header(
"
Host
"
)
 only returns the 
value from the Host header. To use this value as a 
host name you must typecast this string, as 
illustrated in the following example: http.req.
header(
"
host
"
).typecast_http_
hostname_t
For more information on typecasting, see