Retrieves information associated with the virtual host / HTTP path mapping in effect for the VSP page being processed. Values valid in current connection or URL context may be retrieved by element_name.
Calling http_map_get has no use outside of http context. In this case an error will be signalled.
Value returned depends of element_name:
| element_name | Datatype | Return value |
|---|---|---|
| vsp_uid | VARCHAR | Which SQL user active content will execute as |
| soap_uid | VARCHAR | Which SQL user SOAP calls will be executed as |
| persist_ses_vars | INTEGER | Is persisting of session variables enabled? |
| default_page | VARCHAR | Default page for current mapping |
| browseable | INTEGER | Is directory browsing enabled? |
| security_level | VARCHAR | Security level ('DIGEST', 'SSL', 'BASIC') |
| auth_opts | ANY | Application-specific authentication options |
| soap_opts | ANY | Application-specific SOAP options |
| domain | VARCHAR | Directory path that is the logical start point of current mapping. |
| mounted | VARCHAR | Physical path that is the physical start point of current mapping |
<?vsp
declare def_page varchar;
def_page := http_map_get ('default_page');
http (sprintf ('<p>The default page for this path is: %s </p>', def_page));
?>
<HTML>
<HEAD>
<TITLE>TEST</TITLE>
</HEAD>
<BODY>
<P>We're executing as <?= http_map_get ('vsp_uid') ?></P>
<?vsp
if (http_map_get ('security_level') <> 'SSL')
{
?>
Warning: This page is not protected by transport level encryption
and may be viewable by anybody in the middle with a network
sniffer.
<?vsp
}
?>
</BODY>
</HTML>