Chapter 4 Advanced Expressions: Evaluating Text 75
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.
EQ("hostname") Returns a Boolean TRUE value if the host name
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.
PORT Returns the port in the host name. The string following
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.
SERVER Returns the server name portion of the host name. For
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_
NEGOTIATE Returns a Boolean TRUE if the request is a part of an
NTLM or NEGOTIATE connection.
HTTP.REQ.URL.CVPN_
ENCODE Converts the URL to the clientless VPN format.
HTTP Expression Prefixes that Return Text
Prefix Description