2 * This is free and unencumbered software released into the public domain.
4 * Anyone is free to copy, modify, publish, use, compile, sell, or
5 * distribute this software, either in source code form or as a compiled
6 * binary, for any purpose, commercial or non-commercial, and by any
9 * In jurisdictions that recognize copyright laws, the author or authors
10 * of this software dedicate any and all copyright interest in the
11 * software to the public domain. We make this dedication for the benefit
12 * of the public at large and to the detriment of our heirs and
13 * successors. We intend this dedication to be an overt act of
14 * relinquishment in perpetuity of all present and future rights to this
15 * software under copyright law.
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
21 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
22 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23 * OTHER DEALINGS IN THE SOFTWARE.
49 typedef void (*route_fn)(struct client *);
58 int reqdone; /* done parsing the request */
59 int done; /* done handling the client */
63 int http_init(struct client *, int);
64 int http_parse(struct client *);
65 int http_read(struct client *);
66 int http_reply(struct client *, int, const char *, const char *);
67 int http_flush(struct client *);
68 int http_write(struct client *, const char *, size_t);
69 int http_writes(struct client *, const char *);
70 int http_fmt(struct client *, const char *, ...);
71 int http_urlescape(struct client *, const char *);
72 int http_htmlescape(struct client *, const char *);
73 int http_close(struct client *);
74 void http_free(struct client *);