src/server/webdav/webdav.c

branch
webdav
changeset 306
e03737cea6e2
parent 302
dfbd3a535eac
child 307
8787cb5ebab3
--- a/src/server/webdav/webdav.c	Thu Apr 21 17:16:49 2022 +0200
+++ b/src/server/webdav/webdav.c	Sun Apr 24 18:35:44 2022 +0200
@@ -89,7 +89,14 @@
     return ucx_map_cstr_put(webdav_type_map, name, webdavCreate);
 }
 
+static WSBool webdav_is_initialized = FALSE;
+
 int webdav_init(pblock *pb, Session *sn, Request *rq) {
+    if(webdav_is_initialized) {
+        return REQ_NOACTION;
+    }
+    webdav_is_initialized = TRUE;
+    
     webdav_type_map = ucx_map_new(8);
     if(!webdav_type_map) {
         return REQ_ABORTED;
@@ -297,6 +304,7 @@
         // use new plist after previous init (or orig. plist in the first run)
         pReq->properties = newProp;
         pReq->propcount = newPropCount;
+        pReq->dav = davList;
         
         // add new WebdavPropfindRequest object to list for later use
         requestObjects = ucx_list_append_a(a, requestObjects, pReq);
@@ -979,6 +987,14 @@
     return &dav_namespace;
 }
 
+WebdavProperty* webdav_resourcetype_collection(void) {
+    return &dav_resourcetype_collection;
+}
+
+WebdavProperty* webdav_resourcetype_empty(void) {
+    return &dav_resourcetype_empty;
+}
+
 WebdavProperty* webdav_dav_property(
         pool_handle_t *pool,
         const char *name)

mercurial