Os_http_request::cookie_count, Context, Usage – Brocade Virtual ADX OpenScript API Guide (Supporting ADX v03.1.00) User Manual
Page 70: Input parameters, Return values, Example

58
Brocade Virtual ADX OpenScript API Guide
53-1003243-01
Methods
5
OS_HTTP_REQUEST::cookie_count
Returns the number of cookies present in the HTTP request.
Context
This function called in http response context will have no effect.
Usage
Can be used to perform load-balancing based on the number of cookies.
Input Parameters
None.
Return Values
The following table contains the return values.
Example
OS_HTTP_REQUEST::cookie_persist("name"=>$cookie_name,
"domain"=>$domain, "path"=>$path, "age"=>$age)
Inserts a cookie in the http response that the system can persist on. The cookie name, domain,
port and age can be specified in the call. The cookie value is the server-id of the selected real
server.
Context
HTTP request event. If called in the HTTP response context, undefined will be returned.
TABLE 58
Return Values
Name
Type
Description
integer
The number of cookies present
in the request.
use OS_HTTP_REQUEST;
sub HTTP_REQUEST{
my $cookie_cnt = OS_HTTP_REQUEST::cookie_count;
}