Sat, 27 Aug 2022 11:57:27 +0200
fix resourcetype initialization
--- a/src/server/util/writer.c Thu Aug 18 18:18:06 2022 +0200 +++ b/src/server/util/writer.c Sat Aug 27 11:57:27 2022 +0200 @@ -59,6 +59,8 @@ size_t len = w->pos; while(len > 0) { + //fwrite(w->buffer+pos, 1, len, stdout); + //fflush(stdout); ssize_t r = w->write(w->fd, w->buffer + pos, len); if(r <= 0) { break;
--- a/src/server/webdav/multistatus.c Thu Aug 18 18:18:06 2022 +0200 +++ b/src/server/webdav/multistatus.c Sat Aug 27 11:57:27 2022 +0200 @@ -341,7 +341,7 @@ // end multistatus writer_puts(out, S("</D:multistatus>\n")); - //printf("\n\n%.*s\n\n", (int)writer.pos, writer.buffer); + //printf("\n\n"); //fflush(stdout); writer_flush(out);
--- a/src/server/webdav/webdav.c Thu Aug 18 18:18:06 2022 +0200 +++ b/src/server/webdav/webdav.c Sat Aug 27 11:57:27 2022 +0200 @@ -171,12 +171,13 @@ dav_resourcetype_empty.namespace = &dav_namespace; dav_resourcetype_empty.name = "resourcetype"; + dav_resourcetype_collection_value.data = WEBDAV_RESOURCE_TYPE_COLLECTION; + dav_resourcetype_collection_value.length = sizeof(WEBDAV_RESOURCE_TYPE_COLLECTION)-1; + dav_resourcetype_collection.namespace = &dav_namespace; dav_resourcetype_collection.name = "resourcetype"; dav_resourcetype_collection.value.data = dav_resourcetype_collection_value; dav_resourcetype_collection.vtype = WS_VALUE_XML_DATA; - dav_resourcetype_collection_value.data = WEBDAV_RESOURCE_TYPE_COLLECTION; - dav_resourcetype_collection_value.length = sizeof(WEBDAV_RESOURCE_TYPE_COLLECTION)-1; return REQ_PROCEED; }