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

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 132
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 58
Brocade Virtual ADX OpenScript API Guide 47
53-1003243-01
Methods
5
Example
OS_HTTP_REQUEST::header($name, $value)
Set the HTTP header value to the value specified in $name.
Context
HTTP request event. If called in the HTTP response context, undefined will be returned.
Usage
Can be used to replace an existing header or to insert a new header. If a header by the same name
as specified in $name exists, it will be overwritten. If multiple headers by the same name exist, the
first one will be overwritten. If there is no header by the same name, a new header will be inserted.
Input Parameters
The following table contains the input values.
Return Values
None
Example
TABLE 42 Input Values
Name Type Description
$name string A string representing the value
of the header name.
$value string A string representing the header
value.
use OS_SLB;
use OS_HTTP_REQUEST;
sub HTTP_REQUEST {
my $hostheader = OS_HTTP_REQUEST::header("Host");
if (defined $hostheader && $hostheader eq "www.abc.com") {
OS_SLB::forward(1);
} else {
OS_SLB::forward(2);
}
}
use OS_SLB;
use OS_HTTP_REQUEST;
sub HTTP_REQUEST {
OS_HTTP_REQUEST::header("Front-End-SSL","Off");
OS_SLB::forward(1);
}
Vista de pagina 58
1 2 ... 54 55 56 57 58 59 60 61 62 63 64 ... 131 132

Comentarios a estos manuales

Sin comentarios