Brocade Virtual ADX OpenScript API Guide (Supporting ADX v Uživatelský manuál Strana 56

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 132
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 55
44 Brocade Virtual ADX OpenScript API Guide
53-1003243-01
Methods
5
OS_HTTP_REQUEST::url_extension
Returns URL extension specified in the 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 a url extension.
Input Parameters
None.
Return Values
The following table contains the return values.
Example
OS_HTTP_REQUEST::version
Returns request version specified in the 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.
TABLE 37 Return Values
Name Type Description
string Value of the URL extension. If
not present, undefined is
returned.
use OS_HTTP_REQUEST;
use OS_SLB;
sub HTTP_REQUEST{
$ext = OS_HTTP_REQUEST::url_extension;
if($ext eq "jpg")
{
OS_SLB::forward(1);
} else {
OS_SLB::forward(2);
}
}
Zobrazit stránku 55
1 2 ... 51 52 53 54 55 56 57 58 59 60 61 ... 131 132

Komentáře k této Příručce

Žádné komentáře