diff options
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 */ |