libidav/methods.c

branch
dav-2
changeset 920
92fcd6a8cf9e
parent 894
e86049631677
equal deleted inserted replaced
919:7f250903d903 920:92fcd6a8cf9e
715 715
716 return 0; 716 return 0;
717 } 717 }
718 718
719 void set_davprops(DavResource *res) { 719 void set_davprops(DavResource *res) {
720 char *cl = dav_get_string_property_ns(res, "DAV:", "getcontentlength"); 720 const char *cl = dav_get_string_property_ns(res, "DAV:", "getcontentlength");
721 char *ct = dav_get_string_property_ns(res, "DAV:", "getcontenttype"); 721 const char *ct = dav_get_string_property_ns(res, "DAV:", "getcontenttype");
722 char *cd = dav_get_string_property_ns(res, "DAV:", "creationdate"); 722 const char *cd = dav_get_string_property_ns(res, "DAV:", "creationdate");
723 char *lm = dav_get_string_property_ns(res, "DAV:", "getlastmodified"); 723 const char *lm = dav_get_string_property_ns(res, "DAV:", "getlastmodified");
724 724
725 res->contenttype = ct; 725 res->contenttype = (char*)ct;
726 if(cl) { 726 if(cl) {
727 char *end = NULL; 727 char *end = NULL;
728 res->contentlength = strtoull(cl, &end, 0); 728 res->contentlength = strtoull(cl, &end, 0);
729 } 729 }
730 res->creationdate = util_parse_creationdate(cd); 730 res->creationdate = util_parse_creationdate(cd);

mercurial