src/server/webdav/webdav.c

branch
webdav
changeset 302
dfbd3a535eac
parent 301
2bc514931612
child 306
e03737cea6e2
equal deleted inserted replaced
301:2bc514931612 302:dfbd3a535eac
1087 char *buf = pool_malloc(pool, 64); 1087 char *buf = pool_malloc(pool, 64);
1088 if(!buf) { 1088 if(!buf) {
1089 return 1; 1089 return 1;
1090 } 1090 }
1091 uint64_t contentlength = s->st_size; 1091 uint64_t contentlength = s->st_size;
1092 snprintf(buf, 64, "%" PRIu64 "\0", contentlength); 1092 snprintf(buf, 64, "%" PRIu64, contentlength);
1093 if(w_addprop(res, pool, "getcontentlength", buf)) { 1093 if(w_addprop(res, pool, "getcontentlength", buf)) {
1094 return 1; 1094 return 1;
1095 } 1095 }
1096 } 1096 }
1097 if(properties.getlastmodified) { 1097 if(properties.getlastmodified) {
1121 if(!buf) { 1121 if(!buf) {
1122 return 1; 1122 return 1;
1123 } 1123 }
1124 snprintf(buf, 1124 snprintf(buf,
1125 96, 1125 96,
1126 "\"%x-%x\"\0", 1126 "\"%x-%x\"",
1127 (int)s->st_size, 1127 (int)s->st_size,
1128 (int)s->st_mtim.tv_sec); 1128 (int)s->st_mtim.tv_sec);
1129 if(w_addprop(res, pool, "getetag", buf)) { 1129 if(w_addprop(res, pool, "getetag", buf)) {
1130 return 1; 1130 return 1;
1131 } 1131 }

mercurial