--- a/src/server/daemon/error.c Wed Nov 02 19:19:01 2022 +0100 +++ b/src/server/daemon/error.c Sun Nov 06 15:53:32 2022 +0100 @@ -28,24 +28,24 @@ #include "error.h" -#include <ucx/string.h> +#include <cx/string.h> #include "../util/pblock.h" #include "../util/strbuf.h" -// macro for creating an error string (ucx sstr_t) +// macro for creating an error string (ucx cxmutstr) #define ERRMSG(s) { s, sizeof(s)-1 } -static sstr_t error_400 = ERRMSG("<html><body>bad request</body></html>"); -static sstr_t error_403 = ERRMSG("<html><body>forbidden</body></html>"); -static sstr_t error_404 = ERRMSG("<html><body>not found</body></html>"); -static sstr_t error_500 = ERRMSG("<html><body>server error</body></html>"); -static sstr_t error_503 = ERRMSG("<html><body>service unavailable</body></html>"); +static cxmutstr error_400 = ERRMSG("<html><body>bad request</body></html>"); +static cxmutstr error_403 = ERRMSG("<html><body>forbidden</body></html>"); +static cxmutstr error_404 = ERRMSG("<html><body>not found</body></html>"); +static cxmutstr error_500 = ERRMSG("<html><body>server error</body></html>"); +static cxmutstr error_503 = ERRMSG("<html><body>service unavailable</body></html>"); -static sstr_t error_std = ERRMSG("<html><body>error</body></html>"); +static cxmutstr error_std = ERRMSG("<html><body>error</body></html>"); int nsapi_error_request(Session *sn, Request *rq) { short status = rq->status_num; - sstr_t msg; + cxmutstr msg; if(status < 400) { msg.ptr = NULL; msg.length = 0; @@ -82,7 +82,7 @@ } void fatal_error(HTTPRequest *req, int status) { - sstr_t msg = error_500; + cxmutstr msg = error_500; char *statusmsg = "Internal Server Error"; switch(status) { case 400: {