File: http_map_get.xml

package info (click to toggle)
virtuoso-opensource 7.2.5.1%2Bdfsg1-0.3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 285,240 kB
  • sloc: ansic: 641,220; sql: 490,413; xml: 269,570; java: 83,893; javascript: 79,900; cpp: 36,927; sh: 31,653; cs: 25,702; php: 12,690; yacc: 10,227; lex: 7,601; makefile: 7,129; jsp: 4,523; awk: 1,697; perl: 1,013; ruby: 1,003; python: 326
file content (154 lines) | stat: -rw-r--r-- 5,655 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
 -  
 -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 -  project.
 -  
 -  Copyright (C) 1998-2018 OpenLink Software
 -  
 -  This project is free software; you can redistribute it and/or modify it
 -  under the terms of the GNU General Public License as published by the
 -  Free Software Foundation; only version 2 of the License, dated June 1991.
 -  
 -  This program is distributed in the hope that it will be useful, but
 -  WITHOUT ANY WARRANTY; without even the implied warranty of
 -  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 -  General Public License for more details.
 -  
 -  You should have received a copy of the GNU General Public License along
 -  with this program; if not, write to the Free Software Foundation, Inc.,
 -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 -  
 -  
-->
<refentry id="fn_http_map_get">
  <refmeta>
    <refentrytitle>http_map_get</refentrytitle>
    <refmiscinfo>ws</refmiscinfo>
  </refmeta>
  <refnamediv>
    <refname>http_map_get</refname>
    <refpurpose>get values from HTTP virtual host path mapping table</refpurpose>
  </refnamediv>
  <refsynopsisdiv>
    <funcsynopsis id="fsyn_http_map_get">
      <funcprototype id="fproto_http_map_get">
        <funcdef><function>http_map_get</function></funcdef>
        <paramdef>in <parameter>element_name</parameter> varchar</paramdef>
      </funcprototype>
    </funcsynopsis>
  </refsynopsisdiv>
  <refsect1 id="desc_http_map_get"><title>Description</title>
    <para>
    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 <parameter>element_name</parameter>.</para>
    <para>Calling <function>http_map_get</function> has no use outside of http context. In this case an
    error will be signalled.</para>
  </refsect1>
  <refsect1 id="params_http_map_get"><title>Parameters</title>
    <refsect2><title>element_name</title>
      <para>The possible values for element_name are: 'vsp_uid', 'soap_uid', 'persist_ses_vars',
      'default_page', 'browseable', 'security_level' , 'auth_opts', 'soap_opts', 'domain',
      'mounted'.</para>
    </refsect2>
  </refsect1>
  <refsect1 id="ret_http_map_get"><title>Return Types</title>
    <para>Value returned depends of <parameter>element_name</parameter>:</para>
    <table><title>Values returned by http_map_get</title>
      <tgroup cols="3">
        <thead>
          <row>
            <entry>element_name</entry>
            <entry>Datatype</entry>
            <entry>Return value</entry>
          </row>
        </thead>
        <tbody>
          <row>
            <entry>vsp_uid</entry>
            <entry><type>VARCHAR</type></entry>
            <entry>Which SQL user active content will execute as</entry>
          </row>
          <row>
            <entry>soap_uid</entry>
            <entry><type>VARCHAR</type></entry>
            <entry>Which SQL user SOAP calls will be executed as</entry>
          </row>
          <row>
            <entry>persist_ses_vars</entry>
            <entry><type>INTEGER</type></entry>
            <entry>Is persisting of session variables enabled?</entry>
          </row>
          <row>
            <entry>default_page</entry>
            <entry><type>VARCHAR</type></entry>
            <entry>Default page for current mapping</entry>
          </row>
          <row>
            <entry>browseable</entry>
            <entry><type>INTEGER</type></entry>
            <entry>Is directory browsing enabled?</entry>
          </row>
          <row>
            <entry>security_level</entry>
            <entry><type>VARCHAR</type></entry>
            <entry>Security level ('DIGEST', 'SSL', 'BASIC')</entry>
          </row>
          <row>
            <entry>auth_opts</entry>
            <entry><type>ANY</type></entry>
            <entry>Application-specific authentication options</entry>
          </row>
          <row>
            <entry>soap_opts</entry>
            <entry><type>ANY</type></entry>
            <entry>Application-specific SOAP options</entry>
          </row>
          <row>
            <entry>domain</entry>
            <entry><type>VARCHAR</type></entry>
            <entry>Directory path that is the logical start point of current mapping.</entry>
          </row>
          <row>
            <entry>mounted</entry>
            <entry><type>VARCHAR</type></entry>
            <entry>Physical path that is the physical start point of current mapping</entry>
          </row>
	</tbody>
      </tgroup>
    </table>
  </refsect1>
  <refsect1 id="examples_http_map_get"><title>Examples</title>
    <example id="ex_http_map_get"><title>Retrieving Mapping Details</title>
      <screen>&lt;?vsp
declare def_page varchar;
def_page := http_map_get ('default_page');
http (sprintf ('&lt;p&gt;The default page for this path is: %s &lt;/p&gt;', def_page));
?&gt;
</screen>
</example>
    <example id="ex_http_map_get_2"><title>Warn users if non-SSL connection</title>
      <screen>&lt;HTML&gt;
  &lt;HEAD&gt;
    &lt;TITLE&gt;TEST&lt;/TITLE&gt;
  &lt;/HEAD&gt;
  &lt;BODY&gt;
    &lt;P&gt;We're executing as &lt;?= http_map_get ('vsp_uid') ?&gt;&lt;/P&gt;
&lt;?vsp
    if (http_map_get ('security_level') &lt;&gt; 'SSL')
      {
?&gt;
    Warning: This page is not protected by transport level encryption
    and may be viewable by anybody in the middle with a network
    sniffer.
&lt;?vsp
      }
?&gt;
  &lt;/BODY&gt;
&lt;/HTML&gt;
</screen>
    </example>
  </refsect1>
</refentry>