Chapter 6 Advanced Expressions: Parsing HTTP, TCP, and UDP Data 119

Prefixes That Extract HTTP Headers

HTTP Header Prefix

Description

 

 

HTTP.RES.SET_COOKIE.

Returns the value of Port field of the cookie.

COOKIE("name").PORT

Operate as a comma-separated list.

or

For example, the following expression returns

HTTP.RES.SET_COOKIE2.

80. 2580 from Set-Cookie : Customer =

"ABC"; PATH="/a/b/c"; PORT= "80, 2580":

COOKIE("name").PORT

http.res.set_cookie.

 

 

cookie("ABC").port

 

A string of zero length is returned if the Port

 

field or value is absent.

 

 

HTTP.RES.SET_COOKIE.

Ignores the empty elements in the list. For

COOKIE("name").PORT.IGNORE_

example, in the list a=10,b=11, ,c=89, the

EMPTY_ELEMENTS

element delimiter in the list is , and the list has

or

an empty element following a=10. The

element following b=11 is not considered an

HTTP.RES.SET_COOKIE2.

empty element.

As another example, in the following

COOKIE("name").PORT.IGNORE_

EMPTY_ELEMENTS

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.

Returns the value of the first Version field in

COOKIE("name").VERSION

the cookie as a decimal integer.

or

For example, the following expression returns

HTTP.RES.SET_COOKIE2.

1 from the cookie Set-Cookie : Customer =

"ABC"; VERSION = "1"; VERSION = "0"

COOKIE("name").VERSION

http.res.set_cookie.

 

 

cookie("CUSTOMER").version

 

A zero is returned if the Version field or its

 

value is absent or if the value is not a decimal

 

number.

 

 

HTTP.RES.SET_COOKIE.

Returns the nth instance (0-based) of the

COOKIE("name", integer)

cookie with the specified name. If the cookie

or

is absent, returns a text object of length 0.

Returns UNDEF if more than 15 Set-Cookie

HTTP.RES.SET_COOKIE2.

headers are present and the cookie is not

COOKIE("name", integer)

found.

Page 133
Image 133
Citrix Systems 9.2 manual Returns the value of Port field of the cookie, Operate as a comma-separated list, Number, Found