diff options
author | Vincent Douillet <vincent@vdouillet.fr> | 2023-08-01 23:09:57 +0200 |
---|---|---|
committer | Vincent Douillet <vincent@vdouillet.fr> | 2023-08-07 14:57:21 +0200 |
commit | f172ffca292594147939280dab20cb03a4921fb6 (patch) | |
tree | bc63edcd5fbd474cdfdcced0d89b659c3bcc1cb4 /http.h | |
parent | 62b01654da4f1ae1a9aaeab106cea5e7bb9d77e3 (diff) |
add log messages
Diffstat (limited to 'http.h')
-rw-r--r-- | http.h | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -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 */ |