273 |
273 |
274 // begin propfind |
274 // begin propfind |
275 davrq->isdir = S_ISDIR(st.st_mode); |
275 davrq->isdir = S_ISDIR(st.st_mode); |
276 davrq->persistencemgr->propfind_begin(davrq->persistencemgr, davrq); |
276 davrq->persistencemgr->propfind_begin(davrq->persistencemgr, davrq); |
277 |
277 |
|
278 // create the response for the requested resource |
|
279 dav_resource_response(davrq, sstr(ppath), sstr(uri)); |
|
280 |
278 /* |
281 /* |
279 * if the requested webdav resource(file) is a directory, we create |
282 * if the requested webdav resource(file) is a directory, we create |
280 * a response for every child |
283 * a response for every child |
281 */ |
284 */ |
282 if(S_ISDIR(st.st_mode)) { |
285 if(S_ISDIR(st.st_mode)) { |
291 sstr_t newuri = util_path_append(sn->pool, uri, entry.name); |
294 sstr_t newuri = util_path_append(sn->pool, uri, entry.name); |
292 // child response |
295 // child response |
293 dav_resource_response(davrq, newpath, newuri); |
296 dav_resource_response(davrq, newpath, newuri); |
294 } |
297 } |
295 } |
298 } |
296 |
|
297 // create the response for the requested resource |
|
298 dav_resource_response(davrq, sstr(ppath), sstr(uri)); |
|
299 |
299 |
300 // end propfind |
300 // end propfind |
301 davrq->persistencemgr->propfind_begin(davrq->persistencemgr, davrq); |
301 davrq->persistencemgr->propfind_begin(davrq->persistencemgr, davrq); |
302 |
302 |
303 // end xml |
303 // end xml |