about summary refs log tree commit diff
path: root/cgiutil.h
diff options
context:
space:
mode:
Diffstat (limited to 'cgiutil.h')
-rw-r--r--cgiutil.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/cgiutil.h b/cgiutil.h
index e3aad54..1d388af 100644
--- a/cgiutil.h
+++ b/cgiutil.h
@@ -40,3 +40,14 @@ void terminate_headers(void);
  * @return status code and reason phrase as a string.
  */
 char *http_status_line(int status);
+
+/*!
+ * @brief Return HTTP error code for given errno
+ *
+ * Incomplete mapping of `errno`s to HTTP error codes.
+ * Defaults to 500.
+ *
+ * @param err POSIX errno
+ * @return HTTP error code
+ */
+int http_errno(int err);