summaryrefslogtreecommitdiff
path: root/http.h
diff options
context:
space:
mode:
Diffstat (limited to 'http.h')
-rw-r--r--http.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/http.h b/http.h
index e28b2b2..daee438 100644
--- a/http.h
+++ b/http.h
@@ -34,8 +34,20 @@
#include <kcgi.h>
/*
- * Initialize headers and start the document body with the provided http code
+ * Initialize headers and start the document body with the provided http code.
+ * The KCGI request and khttp code are both required.
*/
-void http_open(struct kreq *, enum khttp);
+void http_open(struct kreq *, enum khttp);
+
+/*
+ * Send a plain text error response.
+ * The KCGI request can be NULL.
+ * The khttp code is required.
+ * The error string can be NULL, in this case the http code is printed in plain
+ * text form instead.
+ *
+ * This function exits with EXIT_FAILURE. It never returns.
+ */
+void http_exit(struct kreq *, enum khttp, char *,...);
#endif /* VAULT_HTTP_H */