Brocade Virtual ADX OpenScript API Guide (Supporting ADX v Manual de usuario Pagina 71

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 132
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 70
Brocade Virtual ADX OpenScript API Guide 59
53-1003243-01
Methods
5
Input Parameters
The following table contains the input values.
Return Values
None
Example
OS_HTTP_REQUEST::redirect("domain"=>$domain_value, "status-
code"=>$status_code, "url"=>$url_value, "port"=>$port_value)
Sends an redirect response to a client instead of forwarding the request to a server.
Context
This function can be called from an HTTP request event.
TABLE 59 Input Values
Name Type Description
$cookie_name string A string representing the name of the inserted cookie.
$domain string A string representing the domain attribute of the inserted cookie.
$path string A string representing the path attribute of the inserted cookie.
$age integer An integer representing the age attribute of the inserted cookie. The
unit is minute, for example 60 = 1 hour.
use OS_SLB;
use OS_HTTP_REQUEST;
sub HTTP_REQUEST {
# Get the Cookie from the request
my $hreq_cookie = OS_HTTP_REQUEST::cookie("ServerID");
if (defined $hreq_cookie) {
# forward to server with group id or server id identified by cookie
OS_SLB::forward($hreq_cookie);
} else {
#forward to server with group-id 10, insert set-cookie in response to client
OS_SLB::forward("10");
OS_HTTP_REQUEST::cookie_persist(
"name" =>"ServerID",
"domain" => "www.brocade.com",
"path" => "/",
"age" => "1024");
}
}
Vista de pagina 70
1 2 ... 66 67 68 69 70 71 72 73 74 75 76 ... 131 132

Comentarios a estos manuales

Sin comentarios