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>
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>
19 <!-- Creator : groff version 1.17.2 -->
20 <!-- CreationDate: Fri Aug 30 16:16:23 2002 -->
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>
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 <pthr_http.h>
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>
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>
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>
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>": "</b>,
68 <b>value</b> and <b>CR LF</b>.</td></table>
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>
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>
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 <rich@annexia.org></td></table>
94 <a name="LICENSE"></a>
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>
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>
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