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

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 132
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 51
40 Brocade Virtual ADX OpenScript API Guide
53-1003243-01
Methods
5
Example
OS_HTTP_REQUEST::url($val)
Sets the value of the URL to the value specified in $val.
Context
HTTP request event. If called in the HTTP response context, undefined will be returned.
Usage
Can be used to rewrite a url.
Input Parameters
The following table contains the input values.
Return Values
None
Example
TABLE 32 Input Values
Name Type Description
$val string A string representing the value
of the url.
use OS_HTTP_REQUEST;
use OS_SLB;
sub HTTP_REQUEST{
my $url = OS_HTTP_REQUEST::url;
my $method = OS_HTTP_REQUEST::method;
if ( defined $url && $url eq "/index.html" ){
OS_SLB::forward(1);
} elsif ( defined $method && $method eq "GET" ) {
OS_SLB::forward(2);
}
}
use OS_HTTP_REQUEST;
sub HTTP_REQUEST{
OS_HTTP_REQUEST::url("/index.html");
}
Vista de pagina 51
1 2 ... 47 48 49 50 51 52 53 54 55 56 57 ... 131 132

Comentarios a estos manuales

Sin comentarios