Chapter 9 Advanced Expressions: String Sets, String Patterns, and Data Formats 175
text.TYPECAST_HTTP_
HEADER_T("name")Converts the designated text to a multi-line HTTP header
that you specify in a name argument.
For example, the following expression converts
“MyHeader” to “InHeader”:
http.req.header("MyHeader").typcast_http_
header_t("InHeader")
Typically, text operations that you specify in this type of
expression apply to only the last line of this header, with
some exceptions. For example, the CONTAINS operation
operates on values in all the lines in instances of this header
type.
text.TYPCAST_COOKIE_
TTreats the designated text as an HTTP cookie as it appears in
a Set-Cookie or Set-Cookie2 header. You can apply name-
value list operations as well as text operations to the
designated text. For example, you can designate an equals (=
) as the name-value delimiter and the semicolon (;) as the list
element delimiter.
If you apply name-value list operations, note that the list is
parsed as if IGNORE_EMPTY_ELEMENTS were in effect.
Each cookie begins with a cookie-name=cookie-value pair,
optionally followed by attribute-value pairs that are
separated by a semicolon, as follows:
cookie1=value1;version=n.n;value;domain=
value;path=value
If the same attribute appears more than once in a cookie, the
value for the first instance of the attribute is returned.
number.TYPECAST_
DOUBLE_AT Transforms the number to a value of data type “double”.
number.TYPECAST_IP_
ADDRESS_AT Converts the number to an IP address.
number.TYPECAST_
TIME_AT Converts the number to time format.
Typecasting Operations
Operation Description