summaryrefslogtreecommitdiff
path: root/snac.c
diff options
context:
space:
mode:
Diffstat (limited to 'snac.c')
-rw-r--r--snac.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/snac.c b/snac.c
index 5ba98e1..0df8691 100644
--- a/snac.c
+++ b/snac.c
@@ -170,3 +170,15 @@ int check_password(const char *uid, const char *passwd, const char *hash)
170 170
171 return ret; 171 return ret;
172} 172}
173
174
175const char *http_status_text(int status)
176/* translate status codes to canonical status texts */
177{
178 switch (status) {
179#define HTTP_STATUS(code, name, text) case HTTP_STATUS_ ## name: return #text;
180#include "http_codes.h"
181#undef HTTP_STATUS
182 default: return "Unknown";
183 }
184}