diff options
| author | grunfink <grunfink@comam.es> | 2025-10-13 13:07:06 +0200 |
|---|---|---|
| committer | grunfink <grunfink@comam.es> | 2025-10-13 13:07:06 +0200 |
| commit | 212284c792c86fca52e0172a4d097abc5bb45252 (patch) | |
| tree | 4fe9ebc3859eec9edb46388a606cb6d54898c64a /snac.c | |
| parent | 4f0b97ecf6ee157c56aa4fba781a8b6b5ea36174 (diff) | |
xs_http.h: new file.
Diffstat (limited to 'snac.c')
| -rw-r--r-- | snac.c | 21 |
1 files changed, 1 insertions, 20 deletions
@@ -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"; - } -} |