aboutsummaryrefslogtreecommitdiff
path: root/snac.c
diff options
context:
space:
mode:
Diffstat (limited to 'snac.c')
-rw-r--r--snac.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/snac.c b/snac.c
index a35cd06..31f524f 100644
--- a/snac.c
+++ b/snac.c
@@ -14,6 +14,7 @@
#include "xs_socket.h"
#include "xs_unix_socket.h"
#include "xs_url.h"
+#include "xs_http.h"
#include "xs_httpd.h"
#include "xs_mime.h"
#include "xs_regex.h"
@@ -58,13 +59,6 @@ int mkdirx(const char *pathname)
}
-int valid_status(int status)
-/* is this HTTP status valid? */
-{
- return status >= 200 && status <= 299;
-}
-
-
xs_str *tid(int offset)
/* returns a time-based Id */
{
@@ -176,16 +170,3 @@ int check_password(const char *uid, const char *passwd, const char *hash)
return ret;
}
-
-
-const char *http_status_text(int status)
-/* translate status codes to canonical status texts */
-{
- switch (status) {
- case 599: return "Timeout";
-#define HTTP_STATUS(code, name, text) case HTTP_STATUS_ ## name: return #text;
-#include "http_codes.h"
-#undef HTTP_STATUS
- default: return "Unknown";
- }
-}