Chapter 4 Advanced Expressions: Evaluating Text 75

HTTP Expression Prefixes that Return Text

Prefix

Description

 

 

HTTP.REQ.VERSION

Returns the HTTP version listed in the request.

 

Following is an example:

 

http.req.version "\"HTTP/1.0\"

HTTP.RES.BODY(integer)

Returns a portion of the HTTP response body. The

 

length of the returned text is equal to the number in the

 

integer argument.

 

If there are fewer characters in the body than are

 

specified in integer, the entire body is returned.

 

Following is an example:

 

http.res.body(100).suffix('L',1)

HTTP.RES.STATUS_MSG

Returns the HTTP response status message.

HTTP.RES.VERSION

Returns the HTTP version listed in the response.

HTTP.REQ.URL.HOSTNAME.

Returns a Boolean TRUE value if the host name

EQ("hostname")

matches the hostname argument. The comparison is

 

case insensitive and if textmode is URLENCODED, the

 

host name is decoded before comparison. For example,

 

if the host name is www.mycompany.com., the

 

following is TRUE:

 

http.req.url.hostname.eq("www.mycompany.

 

com")

HTTP.REQ.URL.HOSTNAME.

Returns the port in the host name. The string following

PORT

and including the first colon (“:”) is considered the port

 

value. For example, if the host name is www.

 

mycompany.com:8080, the port is ":8080". If the host

 

name is www.mycompany.com: the port is ":". If the

 

host name is www.mycompany.com, the port is "" and

 

points to a location just after ".com".

 

If the numerical value in the port is missing, it assumes

 

a default value of 80 or 443 (for HTTPS connections).

 

 

HTTP.REQ.URL.HOSTNAME.

Returns the server name portion of the host name. For

SERVER

example, if the host name is www.mycompany.com or

 

www.mycompany.com:8080, the returned server name

 

is www.mycompany.com.

 

This method sets the text mode to case insensitive. All

 

text operations after this method are case insensitive.

HTTP.REQ.IS_NTLM_OR_

Returns a Boolean TRUE if the request is a part of an

NEGOTIATE

NTLM or NEGOTIATE connection.

HTTP.REQ.URL.CVPN_

Converts the URL to the clientless VPN format.

ENCODE

 

Page 89
Image 89
Citrix Systems 9.2 manual Returns the Http version listed in the request, Returns a portion of the Http response body