Add to git.
[pthrlib.git] / doc / new_http_response.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>new_http_response</title>
6 </head>
7 <body>
8
9 <h1 align=center>new_http_response</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: Fri Aug 30 16:16:30 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 new_http_response, http_response_send_header, http_response_send_headers, http_response_end_headers - functions for sending HTTP responses</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;pthr_http.h&gt;
36
37 http_response new_http_response (pseudothread, http_request, io_handle, int code, const char *msg);
38 void http_response_send_header (http_response, const char *key, const char *value);
39 void http_response_send_headers (http_response, ...);
40 int http_response_end_headers (http_response h);
41 </b></pre></td></table>
42 <a name="DESCRIPTION"></a>
43 <h2>DESCRIPTION</h2>
44
45 <table width="100%" border=0 rules="none" frame="void"
46        cols="2" cellspacing="0" cellpadding="0">
47 <tr valign="top" align="left">
48 <td width="10%"></td><td width="90%">
49 These functions allow you to efficiently generate outgoing
50 HTTP responses.</td></table>
51
52 <table width="100%" border=0 rules="none" frame="void"
53        cols="2" cellspacing="0" cellpadding="0">
54 <tr valign="top" align="left">
55 <td width="10%"></td><td width="90%">
56 <b>new_http_response</b> generates a new HTTP response
57 object and returns it. <b>code</b> is the HTTP response code
58 (see RFC 2616 for a list of codes), and <b>msg</b> is the
59 HTTP response message.</td></table>
60
61 <table width="100%" border=0 rules="none" frame="void"
62        cols="2" cellspacing="0" cellpadding="0">
63 <tr valign="top" align="left">
64 <td width="10%"></td><td width="90%">
65 <b>http_response_send_header</b> sends a single HTTP header
66 back to the client. The header is constructed by
67 concatenating <b>key</b>, <b>&quot;: &quot;</b>,
68 <b>value</b> and <b>CR LF</b>.</td></table>
69
70 <table width="100%" border=0 rules="none" frame="void"
71        cols="2" cellspacing="0" cellpadding="0">
72 <tr valign="top" align="left">
73 <td width="10%"></td><td width="90%">
74 <b>http_response_send_headers</b> sends back several headers
75 in a single call. The arguments to this function are a list
76 of <b>key</b>, <b>value</b> pairs followed by a single
77 <b>NULL</b> argument which terminates the list.</td></table>
78
79 <table width="100%" border=0 rules="none" frame="void"
80        cols="2" cellspacing="0" cellpadding="0">
81 <tr valign="top" align="left">
82 <td width="10%"></td><td width="90%">
83 <b>http_response_end_headers</b> ends the header list. It
84 causes the code to emit any missing-but-required headers and
85 then send the final <b>CR LF</b> characters.</td></table>
86 <a name="AUTHOR"></a>
87 <h2>AUTHOR</h2>
88
89 <table width="100%" border=0 rules="none" frame="void"
90        cols="2" cellspacing="0" cellpadding="0">
91 <tr valign="top" align="left">
92 <td width="10%"></td><td width="90%">
93 Richard Jones &lt;rich@annexia.org&gt;</td></table>
94 <a name="LICENSE"></a>
95 <h2>LICENSE</h2>
96
97 <table width="100%" border=0 rules="none" frame="void"
98        cols="2" cellspacing="0" cellpadding="0">
99 <tr valign="top" align="left">
100 <td width="10%"></td><td width="90%">
101 GNU LGPL (see http://www.gnu.org/)</td></table>
102 <a name="VERSION"></a>
103 <h2>VERSION</h2>
104
105 <table width="100%" border=0 rules="none" frame="void"
106        cols="2" cellspacing="0" cellpadding="0">
107 <tr valign="top" align="left">
108 <td width="10%"></td><td width="90%">
109 pthrlib-3.0.3</td></table>
110 <a name="SEE ALSO"></a>
111 <h2>SEE ALSO</h2>
112
113 <table width="100%" border=0 rules="none" frame="void"
114        cols="2" cellspacing="0" cellpadding="0">
115 <tr valign="top" align="left">
116 <td width="10%"></td><td width="90%">
117 <b>new_http_request(3)</b>, <b>new_cgi(3)</b>,
118 <b>new_pseudothread(3)</b>, <b>io_fdopen(3)</b>, RFC
119 2616.</td></table>
120 <hr>
121 </body>
122 </html>