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

Prefixes That Extract HTTP Headers

HTTP Header Prefix

Description

 

 

HTTP.RES.SET_COOKIE.

Ignores the empty elements in the list. For

COOKIE("name", integer).PATH.

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

IGNORE_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", integer).PATH.

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 or values of the Port field of

COOKIE("name", integer).PORT

the named cookie as a ',' separated list. For

or

example, the following expression returns 80,

2580 from the cookie Set-Cookie : Customer

HTTP.RES.SET_COOKIE2.

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

http.res.set_cookie.

COOKIE("name", integer).PORT

 

cookie("ABC").port

 

A string of zero length is returned if the Port

 

field or its value is absent.

 

 

HTTP.RES.SET_COOKIE.

Ignores the empty elements in the list. For

COOKIE("name", integer).PORT.

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

IGNORE_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", integer).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

Page 135
Image 135
Citrix Systems 9.2 manual Named cookie as a , separated list. For, From the cookie Set-Cookie Customer