Mon, 25 Apr 2022 13:54:27 +0200
close last resource in multistatus_send
src/server/webdav/multistatus.c | file | annotate | diff | comparison | revisions |
--- a/src/server/webdav/multistatus.c Mon Apr 25 13:48:05 2022 +0200 +++ b/src/server/webdav/multistatus.c Mon Apr 25 13:54:27 2022 +0200 @@ -255,7 +255,12 @@ return out->error; } -int multistatus_send(Multistatus *ms, SYS_NETFD net) { +int multistatus_send(Multistatus *ms, SYS_NETFD net) { + // make sure every resource is closed + if(ms->current && !ms->current->resource.isclosed) { + msresponse_close((WebdavResource*)ms->current); + } + // start http response protocol_status(ms->sn, ms->rq, 207, NULL); protocol_start_response(ms->sn, ms->rq);