# HG changeset patch # User Olaf Wintermann # Date 1650919085 -7200 # Node ID 6b1a6066ee436590c5b6ea1dae1622eacc79ec62 # Parent 3ad0b65ec83838eaa0d2a3c8104a35016a7af057 fix pg propfind for getlastmodified property diff -r 3ad0b65ec838 -r 6b1a6066ee43 src/server/plugins/postgresql/webdav.c --- a/src/server/plugins/postgresql/webdav.c Mon Apr 25 22:35:30 2022 +0200 +++ b/src/server/plugins/postgresql/webdav.c Mon Apr 25 22:38:05 2022 +0200 @@ -418,13 +418,13 @@ char buf[HTTP_DATE_LEN+1]; strftime(buf, HTTP_DATE_LEN, HTTP_DATE_FMT, &tm); - webdav_resource_add_dav_stringproperty(resource, pool, "getcontentlength", buf, strlen(buf)); + webdav_resource_add_dav_stringproperty(resource, pool, "getlastmodified", buf, strlen(buf)); } if(vfsprops.creationdate) { char *creationdate = PQgetvalue(result, r, 6); webdav_resource_add_dav_stringproperty(resource, pool, "creationdate", creationdate, strlen(creationdate)); } - if(vfsprops.getcontentlength) { + if(vfsprops.getcontentlength && !iscollection) { char *contentlength = PQgetvalue(result, r, 7); webdav_resource_add_dav_stringproperty(resource, pool, "getcontentlength", contentlength, strlen(contentlength)); }