The Cookie parser creates a hash table based on the Cookie header contents in the baseline request. The elements of this hash table need to be referred to by using the names of the cookies.
The cookie name in the point can be a regular expression of the Ruby programming language.
The Cookie parser can only be used in the point together with the Header filter that refers to the Cookie header of the baseline request.
GET /login/index.php HTTP/1.1 Host: example.com Cookie: id=01234; username=admin
request, the HTTP parser and the Cookie parser create hash tables with the corresponding header data.
The Header filter refers to the following hash table:
|Header name||Header value|
In this hash table, the header names are the keys and the values of the corresponding headers are the hash table values.
HEADER_Cookie_value point to work with the Cookie as a string value. In the current example this point refers to the
id=01234; username=admin string.
The Cookie parser creates the following hash table:
|Cookie name||Cookie value|
The Cookie parser creates a hash table on the basis of the Cookie header data that is taken from the hash table addressed by the Header filter. In this hash table, the cookie names are the keys and the corresponding cookies’ values are the hash table values.
HEADER_Cookie_COOKIE_id_valuepoint refers to the
01234value that corresponds to the
idkey from the hash table created by the Cookie parser.
HEADER_Cookie_COOKIE_username_valuepoint refers to the
adminvalue that corresponds to the
usernamekey from the hash table created by the Cookie parser.