src/server/webdav/webdav.c

changeset 94
6b15a094d996
parent 91
fac51f87def0
child 107
7e81699d1f77
equal deleted inserted replaced
93:95b77e842db3 94:6b15a094d996
588 } 588 }
589 589
590 if(!S_ISDIR(st.st_mode)) { 590 if(!S_ISDIR(st.st_mode)) {
591 prop.name = "getcontentlength"; 591 prop.name = "getcontentlength";
592 char buf[32]; 592 char buf[32];
593 size_t n = snprintf(buf, 32, "%lld", st.st_size); 593 size_t n = snprintf(buf, 32, "%jd", st.st_size);
594 dav_propfind_add_str_prop(rq, &prop, buf, n); 594 dav_propfind_add_str_prop(rq, &prop, buf, n);
595 } 595 }
596 596
597 prop.name = "getlastmodified"; 597 prop.name = "getlastmodified";
598 598
616 } else { 616 } else {
617 dav_propfind_add_str_prop(rq, prop, NULL, 0); 617 dav_propfind_add_str_prop(rq, prop, NULL, 0);
618 } 618 }
619 } else if(!strcmp(s, "getcontentlength") && !S_ISDIR(st.st_mode)) { 619 } else if(!strcmp(s, "getcontentlength") && !S_ISDIR(st.st_mode)) {
620 char buf[32]; 620 char buf[32];
621 size_t n = snprintf(buf, 32, "%lld", st.st_size); 621 size_t n = snprintf(buf, 32, "%jd", st.st_size);
622 dav_propfind_add_str_prop(rq, prop, buf, n); 622 dav_propfind_add_str_prop(rq, prop, buf, n);
623 } else if(!strcmp(s, "getlastmodified")) { 623 } else if(!strcmp(s, "getlastmodified")) {
624 sstr_t s = date_format_http(st.st_mtime, rq->sn->pool); 624 sstr_t s = date_format_http(st.st_mtime, rq->sn->pool);
625 dav_propfind_add_str_prop(rq, prop, s.ptr, s.length); 625 dav_propfind_add_str_prop(rq, prop, s.ptr, s.length);
626 } else if(!strcmp(s, "creationdate")) { 626 } else if(!strcmp(s, "creationdate")) {

mercurial