Add to git.
[rws.git] / doc / rws_request_host_header.3.html
1 <html>
2 <head>
3 <meta name="generator" content="groff -Thtml, see www.gnu.org">
4 <meta name="Content-Style" content="text/css">
5 <title>rws_request_pool</title>
6 </head>
7 <body>
8
9 <h1 align=center>rws_request_pool</h1>
10 <a href="#NAME">NAME</a><br>
11 <a href="#SYNOPSIS">SYNOPSIS</a><br>
12 <a href="#DESCRIPTION">DESCRIPTION</a><br>
13 <a href="#AUTHOR">AUTHOR</a><br>
14 <a href="#LICENSE">LICENSE</a><br>
15 <a href="#VERSION">VERSION</a><br>
16 <a href="#SEE ALSO">SEE ALSO</a><br>
17
18 <hr>
19 <!-- Creator     : groff version 1.17.2 -->
20 <!-- CreationDate: Sat Aug 31 15:31:08 2002 -->
21 <a name="NAME"></a>
22 <h2>NAME</h2>
23 <table width="100%" border=0 rules="none" frame="void"
24        cols="2" cellspacing="0" cellpadding="0">
25 <tr valign="top" align="left">
26 <td width="10%"></td><td width="90%">
27 rws_request_pool, rws_request_pth, rws_request_http_request, rws_request_io, rws_request_host_header, rws_request_canonical_path, rws_request_file_path - retrieve fields in rws_request object</td></table>
28 <a name="SYNOPSIS"></a>
29 <h2>SYNOPSIS</h2>
30
31 <table width="100%" border=0 rules="none" frame="void"
32        cols="2" cellspacing="0" cellpadding="0">
33 <tr valign="top" align="left">
34 <td width="10%"></td><td width="90%">
35 <pre><b>#include &lt;rws_request.h&gt;
36
37 pool rws_request_pool (rws_request);
38 pseudothread rws_request_pth (rws_request);
39 http_request rws_request_http_request (rws_request);
40 io_handle rws_request_io (rws_request);
41 const char *rws_request_host_header (rws_request);
42 const char *rws_request_canonical_path (rws_request);
43 const char *rws_request_file_path (rws_request);
44 </b></pre></td></table>
45 <a name="DESCRIPTION"></a>
46 <h2>DESCRIPTION</h2>
47
48 <table width="100%" border=0 rules="none" frame="void"
49        cols="2" cellspacing="0" cellpadding="0">
50 <tr valign="top" align="left">
51 <td width="10%"></td><td width="90%">
52 These functions retrieve the fields in an <b>rws_request</b>
53 object. This object is passed to shared object scripts when
54 they are invoked by rws as:</td></table>
55
56 <table width="100%" border=0 rules="none" frame="void"
57        cols="2" cellspacing="0" cellpadding="0">
58 <tr valign="top" align="left">
59 <td width="10%"></td><td width="90%">
60 <b>int handle_request (rws_request rq)</b></td></table>
61
62 <table width="100%" border=0 rules="none" frame="void"
63        cols="2" cellspacing="0" cellpadding="0">
64 <tr valign="top" align="left">
65 <td width="10%"></td><td width="90%">
66 <b>rws_request_pool</b> returns the per-request pool. If you
67 wish to store data between requests, then use static
68 variables, or create your own subpool of <b>global_pool</b>,
69 or make allocations in <b>_init</b>.</td></table>
70
71 <table width="100%" border=0 rules="none" frame="void"
72        cols="2" cellspacing="0" cellpadding="0">
73 <tr valign="top" align="left">
74 <td width="10%"></td><td width="90%">
75 <b>rws_request_pth</b> returns the currently running thread
76 handle.</td></table>
77
78 <table width="100%" border=0 rules="none" frame="void"
79        cols="2" cellspacing="0" cellpadding="0">
80 <tr valign="top" align="left">
81 <td width="10%"></td><td width="90%">
82 <b>rws_request_http_request</b> returns the current HTTP
83 request (see <b>new_http_request(3)</b>). To parse the CGI
84 parameters, you need to call <b>new_cgi</b> (see
85 <b>new_cgi(3)</b>).</td></table>
86
87 <table width="100%" border=0 rules="none" frame="void"
88        cols="2" cellspacing="0" cellpadding="0">
89 <tr valign="top" align="left">
90 <td width="10%"></td><td width="90%">
91 <b>rws_request_io</b> returns the IO handle connected to the
92 browser.</td></table>
93
94 <table width="100%" border=0 rules="none" frame="void"
95        cols="2" cellspacing="0" cellpadding="0">
96 <tr valign="top" align="left">
97 <td width="10%"></td><td width="90%">
98 <b>rws_request_host_header</b> returns the contents of the
99 HTTP <b>Host:</b> header, or the string <b>default</b> if
100 none was given.</td></table>
101
102 <table width="100%" border=0 rules="none" frame="void"
103        cols="2" cellspacing="0" cellpadding="0">
104 <tr valign="top" align="left">
105 <td width="10%"></td><td width="90%">
106 <b>rws_request_canonical_path</b> returns the canonical path
107 requested by the browser (after removing <b>..</b>,
108 <b>//</b>, etc.), eg. <b>/so-bin/file.so</b>.</td></table>
109
110 <table width="100%" border=0 rules="none" frame="void"
111        cols="2" cellspacing="0" cellpadding="0">
112 <tr valign="top" align="left">
113 <td width="10%"></td><td width="90%">
114 <b>rws_request_file_path</b> returns the actual path to the
115 SO file being requested, eg.
116 <b>/usr/share/rws/so-bin/file.so</b>.</td></table>
117 <a name="AUTHOR"></a>
118 <h2>AUTHOR</h2>
119
120 <table width="100%" border=0 rules="none" frame="void"
121        cols="2" cellspacing="0" cellpadding="0">
122 <tr valign="top" align="left">
123 <td width="10%"></td><td width="90%">
124 Richard Jones &lt;rich@annexia.org&gt;</td></table>
125 <a name="LICENSE"></a>
126 <h2>LICENSE</h2>
127
128 <table width="100%" border=0 rules="none" frame="void"
129        cols="2" cellspacing="0" cellpadding="0">
130 <tr valign="top" align="left">
131 <td width="10%"></td><td width="90%">
132 GNU LGPL (see http://www.gnu.org/)</td></table>
133 <a name="VERSION"></a>
134 <h2>VERSION</h2>
135
136 <table width="100%" border=0 rules="none" frame="void"
137        cols="2" cellspacing="0" cellpadding="0">
138 <tr valign="top" align="left">
139 <td width="10%"></td><td width="90%">
140 rws-0.9.6</td></table>
141 <a name="SEE ALSO"></a>
142 <h2>SEE ALSO</h2>
143
144 <table width="100%" border=0 rules="none" frame="void"
145        cols="2" cellspacing="0" cellpadding="0">
146 <tr valign="top" align="left">
147 <td width="10%"></td><td width="90%">
148 <b>new_cgi(3)</b>, <b>new_http_response(3)</b>,
149 <b>new_http_request(3)</b>, pthrlib tutorial, rws
150 <b>examples/</b> directory.</td></table>
151 <hr>
152 </body>
153 </html>