dav/finfo.c

changeset 607
5dc7fe41e8f8
parent 539
8deb52292c99
child 614
e72d2b99b0f6
--- a/dav/finfo.c	Sun Jun 16 13:14:24 2019 +0200
+++ b/dav/finfo.c	Sat Jun 22 16:36:52 2019 +0200
@@ -101,7 +101,7 @@
         char str[32];
         struct tm *date = gmtime(&s->st_mtime);
         strftime(str, 32, "%a, %d %b %Y %H:%M:%S GMT", date);
-        DavXmlNode *mtime = dav_xml_createnode_with_text(DAV_NS, "mtime", str);
+        DavXmlNode *mtime = dav_xml_createnode_with_text(DAV_PROPS_NS, "mtime", str);
         content = mtime;
         last = mtime;
     }
@@ -113,7 +113,7 @@
         mode_t mode = s->st_mode & 07777;
         char str[32];
         snprintf(str, 32, "%o", (int)mode);
-        DavXmlNode *xmode = dav_xml_createnode_with_text(DAV_NS, "mode", str);
+        DavXmlNode *xmode = dav_xml_createnode_with_text(DAV_PROPS_NS, "mode", str);
         if(last) {
             last->next = xmode;
         } else {
@@ -124,7 +124,7 @@
 #endif
     
     
-    dav_set_property(res, "idav:finfo", content);;
+    dav_set_property_ns(res, DAV_PROPS_NS, "finfo", content);;
     
     return 0;
 }
@@ -245,11 +245,11 @@
         return 0;
     }
     
-    DavXmlNode *content = dav_xml_createnode_with_text(DAV_NS, "hash", xattr->hash);
+    DavXmlNode *content = dav_xml_createnode_with_text(DAV_PROPS_NS, "hash", xattr->hash);
     DavXmlNode *last = content;
     
     for(int i=0;i<xattr->nattr;i++) {
-        DavXmlNode *attr = dav_xml_createnode(DAV_NS, "xattr");
+        DavXmlNode *attr = dav_xml_createnode(DAV_PROPS_NS, "xattr");
         dav_xml_add_attr(attr, "name", xattr->names[i]);
         last->next = attr;
         last = attr;
@@ -262,7 +262,7 @@
         }
     }
     
-    dav_set_property(res, "idav:xattributes", content);
+    dav_set_property_ns(res, DAV_PROPS_NS, "xattributes", content);
     
     return 0;
 }

mercurial