diff -r 99a34860c105 -r d938228c382e src/server/daemon/error.c --- 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 +#include #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("bad request"); -static sstr_t error_403 = ERRMSG("forbidden"); -static sstr_t error_404 = ERRMSG("not found"); -static sstr_t error_500 = ERRMSG("server error"); -static sstr_t error_503 = ERRMSG("service unavailable"); +static cxmutstr error_400 = ERRMSG("bad request"); +static cxmutstr error_403 = ERRMSG("forbidden"); +static cxmutstr error_404 = ERRMSG("not found"); +static cxmutstr error_500 = ERRMSG("server error"); +static cxmutstr error_503 = ERRMSG("service unavailable"); -static sstr_t error_std = ERRMSG("error"); +static cxmutstr error_std = ERRMSG("error"); 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: {