summaryrefslogtreecommitdiff
path: root/http.h
diff options
context:
space:
mode:
authorVincent Douillet <vincent@vdouillet.fr>2023-08-01 23:09:57 +0200
committerVincent Douillet <vincent@vdouillet.fr>2023-08-07 14:57:21 +0200
commitf172ffca292594147939280dab20cb03a4921fb6 (patch)
treebc63edcd5fbd474cdfdcced0d89b659c3bcc1cb4 /http.h
parent62b01654da4f1ae1a9aaeab106cea5e7bb9d77e3 (diff)
add log messages
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 */