Brocade Virtual ADX OpenScript API Guide (Supporting ADX v Manuel d'utilisateur Page 53

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 132
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 52
Brocade Virtual ADX OpenScript API Guide 41
53-1003243-01
Methods
5
OS_HTTP_REQUEST::path
Returns URL path specified in HTTP request header if it exists, otherwise it will return NULL.
Context
HTTP request event. If called in the HTTP response context, undefined will be returned.
Usage
Can be used to perform load-balancing based on the url path.
Input Parameters
None.
Return Values
The following table contains the return values.
Example
OS_HTTP_REQUEST::path($val)
Sets the value of the url path to the value specified in $val.
Context
HTTP request event. This function called in http response context will have no effect.
Usage
Used to rewrite a url path.
TABLE 33 Return Values
Name Type Description
string Value of the url. If not present,
undefined is returned.
use OS_HTTP_REQUEST;
use OS_SLB;
sub HTTP_REQUEST{
my $path = OS_HTTP_REQUEST::path;
my $method = OS_HTTP_REQUEST::method;
if (defined $path && $path eq "/cgi-bin/") {
OS_SLB::forward(1);
} elsif ( defined $method && $method eq "GET") {
OS_SLB::forward(2);
}
}
Vue de la page 52
1 2 ... 48 49 50 51 52 53 54 55 56 57 58 ... 131 132

Commentaires sur ces manuels

Pas de commentaire