Chapter 6 Advanced Expressions: Parsing HTTP, TCP, and UDP Data 121
HTTP.RES.SET_COOKIE.
COOKIE("name", integer).PATH.
IGNORE_EMPTY_ELEMENTS
or
HTTP.RES.SET_COOKIE2.
COOKIE("name", integer).PATH.
IGNORE_EMPTY_ELEMENTS
Ignores the empty elements in the list. For
example, in the list a=10,b=11, ,c=89, the
element delimiter in the list is , and the list has
an empty element following a=10. The
element following b=11 is not considered an
empty element.
As another example, in the following
expression, if a request contains Cust_Header
: 123,,24, ,15 the following expression returns
a value of 4:
http.req.header("Cust_Header").
typecast_list_t(',').ignore_
empty_elements.count
The following expression returns a value of 5:
http.req.header("Cust_Header").
typecast_list_t(',').count
HTTP.RES.SET_COOKIE.
COOKIE("name", integer).PORT
or
HTTP.RES.SET_COOKIE2.
COOKIE("name", integer).PORT
Returns the value or values of the Port field of
the named cookie as a ',' separated list. For
example, the following expression returns 80,
2580 from the cookie Set-Cookie : Customer
= "ABC"; PATH="/a/b/c"; POR T= "80, 2580"
http.res.set_cookie.
cookie("ABC").port
A string of zero length is returned if the Port
field or its value is absent.
HTTP.RES.SET_COOKIE.
COOKIE("name", integer).PORT.
IGNORE_EMPTY_ELEMENTS
or
HTTP.RES.SET_COOKIE2.
COOKIE("name", integer).PORT.
IGNORE_EMPTY_ELEMENTS
Ignores the empty elements in the list. For
example, in the list a=10,b=11, ,c=89, the
element delimiter in the list is , and the list has
an empty element following a=10. The
element following b=11 is not considered an
empty element.
As another example, in the following
expression, if a request contains Cust_Header
: 123,,24, ,15 the following expression returns
a value of 4:
http.req.header("Cust_Header").
typecast_list_t(',').ignore_
empty_elements.count
The following expression returns a value of 5:
http.req.header("Cust_Header").
typecast_list_t(',').count
Prefixes That Extract HTTP Headers
HTTP Header Prefix Description