src/server/webdav/webdav.c

changeset 453
4586d534f9b5
parent 415
d938228c382e
child 476
477cbeec7b0b
equal deleted inserted replaced
452:ce359a2b51fe 453:4586d534f9b5
1282 return 1; 1282 return 1;
1283 } 1283 }
1284 buf[HTTP_DATE_LEN] = 0; 1284 buf[HTTP_DATE_LEN] = 0;
1285 1285
1286 struct tm mtms; 1286 struct tm mtms;
1287 struct tm *mtm = system_gmtime(&s->st_mtim.tv_sec, &mtms); 1287 struct tm *mtm = system_gmtime(&s->st_mtime, &mtms);
1288 1288
1289 if(mtm) { 1289 if(mtm) {
1290 strftime(buf, HTTP_DATE_LEN, HTTP_DATE_FMT, mtm); 1290 strftime(buf, HTTP_DATE_LEN, HTTP_DATE_FMT, mtm);
1291 if(webdav_resource_add_dav_stringproperty(res, pool, "getlastmodified", buf, strlen(buf))) { 1291 if(webdav_resource_add_dav_stringproperty(res, pool, "getlastmodified", buf, strlen(buf))) {
1292 return 1; 1292 return 1;
1305 } 1305 }
1306 snprintf(buf, 1306 snprintf(buf,
1307 96, 1307 96,
1308 "\"%x-%x\"", 1308 "\"%x-%x\"",
1309 (int)s->st_size, 1309 (int)s->st_size,
1310 (int)s->st_mtim.tv_sec); 1310 (int)s->st_mtime);
1311 if(webdav_resource_add_dav_stringproperty(res, pool, "getetag", buf, strlen(buf))) { 1311 if(webdav_resource_add_dav_stringproperty(res, pool, "getetag", buf, strlen(buf))) {
1312 return 1; 1312 return 1;
1313 } 1313 }
1314 } 1314 }
1315 1315

mercurial