2 * Copyright (c) 2023 Omar Polo <op@omarpolo.com>
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
41 int http_parse(struct request *, int);
42 int http_read(struct request *, int);
43 void http_response_init(struct reswriter *, int);
44 int http_reply(struct reswriter *, int, const char *, const char *);
45 int http_flush(struct reswriter *);
46 int http_write(struct reswriter *, const char *, size_t);
47 int http_writes(struct reswriter *, const char *);
48 int http_fmt(struct reswriter *, const char *, ...);
49 int http_urlescape(struct reswriter *, const char *);
50 int http_htmlescape(struct reswriter *, const char *);
51 int http_close(struct reswriter *);
52 void http_free_request(struct request *);