diff -r 205d41b19a13 -r 3887fd7e8bd7 src/server/daemon/httprequest.c --- a/src/server/daemon/httprequest.c Tue Dec 02 19:35:29 2025 +0100 +++ b/src/server/daemon/httprequest.c Fri Dec 05 17:37:48 2025 +0100 @@ -87,47 +87,6 @@ return (cxmutstr){ "/", 1 }; } -NSAPISession* nsapisession_create(pool_handle_t *pool) { - NSAPISession *sn = pool_malloc(pool, sizeof(NSAPISession)); - if(!sn) { - return NULL; - } - - ZERO(sn, sizeof(NSAPISession)); - - sn->sn.pool = pool; - - sn->sn.client = pblock_create_pool(sn->sn.pool, 8); - if(!sn->sn.client) { - pool_free(pool, sn); - return NULL; - } - sn->sn.fill = 1; - - return sn; -} - -int nsapisession_setconnection(NSAPISession *sn, Connection *conn, netbuf *inbuf, IOStream **io) { - SessionHandler *sh = conn->session_handler; - WSBool ssl; - IOStream *sio = sh->create_iostream(sh, conn, sn->sn.pool, &ssl); - if(!sio) { - return 1; - } - *io = sio; - IOStream *http = httpstream_new(sn->sn.pool, sio); - if(!http) { - return 1; - } - sn->connection = conn; - sn->netbuf = inbuf; - sn->sn.csd = http; - sn->sn.ssl = ssl; - sn->sn.inbuf = inbuf; - sn->sn.inbuf->sd = http; - return 0; -} - int handle_request(HTTPRequest *request, threadpool_t *thrpool, EventHandler *ev) { // handle nsapi request