implement allprop in default and postgresql webdav backends webdav

Tue, 03 May 2022 21:41:00 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Tue, 03 May 2022 21:41:00 +0200
branch
webdav
changeset 331
ab26980faad6
parent 330
71b652743871
child 332
6f82ede01e1c

implement allprop in default and postgresql webdav backends

src/server/plugins/postgresql/webdav.c file | annotate | diff | comparison | revisions
src/server/public/webdav.h file | annotate | diff | comparison | revisions
src/server/webdav/webdav.c file | annotate | diff | comparison | revisions
--- a/src/server/plugins/postgresql/webdav.c	Mon May 02 20:37:13 2022 +0200
+++ b/src/server/plugins/postgresql/webdav.c	Tue May 03 21:41:00 2022 +0200
@@ -457,7 +457,7 @@
     
     pg->path = path;
     pg->resource_id = resource_id;
-    pg->vfsproperties = webdav_vfs_properties(outplist, TRUE, 0);
+    pg->vfsproperties = webdav_vfs_properties(outplist, TRUE, rq->allprop, 0);
     pg->result = result;
     pg->nrows = nrows;
     
--- a/src/server/public/webdav.h	Mon May 02 20:37:13 2022 +0200
+++ b/src/server/public/webdav.h	Tue May 03 21:41:00 2022 +0200
@@ -458,6 +458,7 @@
 WebdavVFSProperties webdav_vfs_properties(
         WebdavPList **plistInOut,
         WSBool removefromlist,
+        WSBool appprop,
         uint32_t flags);
 
 int webdav_add_vfs_properties(
--- a/src/server/webdav/webdav.c	Mon May 02 20:37:13 2022 +0200
+++ b/src/server/webdav/webdav.c	Tue May 03 21:41:00 2022 +0200
@@ -797,7 +797,7 @@
     }
     rq->userdata = data;
     
-    data->vfsproperties = webdav_vfs_properties(outplist, TRUE, 0);
+    data->vfsproperties = webdav_vfs_properties(outplist, TRUE, rq->allprop, 0);
     
     return 0;
 }
@@ -1132,6 +1132,7 @@
 WebdavVFSProperties webdav_vfs_properties(
         WebdavPList **plistInOut,
         WSBool removefromlist,
+        WSBool allprop,
         uint32_t flags)
 {
     WebdavVFSProperties ret;
@@ -1167,6 +1168,14 @@
         }
     }
     
+    if(allprop) {
+        ret.creationdate = 1;
+        ret.getcontentlength = 1;
+        ret.getetag = 1;
+        ret.getlastmodified = 1;
+        ret.getresourcetype = 1;
+    }
+    
     return ret;
 }
 

mercurial