276 sn->error = DAV_ERROR; |
276 sn->error = DAV_ERROR; |
277 return 1; |
277 return 1; |
278 } |
278 } |
279 //char *href = (char*)href_node->content; |
279 //char *href = (char*)href_node->content; |
280 href = util_url_path((char*)href_node->content); |
280 href = util_url_path((char*)href_node->content); |
281 if(xstreq(resource->href, href)) { |
281 |
|
282 sstr_t href_s = sstr((char*)href); |
|
283 sstr_t href_r = sstr(resource->href); |
|
284 if(!sstrcmp(href_s, href_r)) { |
282 res = resource; |
285 res = resource; |
283 } else { |
286 } else if(href_s.length == href_r.length + 1) { |
284 //res = dav_resource_new_href(resource->session, href); |
287 if(href_s.ptr[href_s.length-1] == '/') { |
285 //res->parent = resource; |
288 href_s.length--; |
|
289 if(!sstrcmp(href_s, href_r)) { |
|
290 res = resource; |
|
291 } |
|
292 } |
286 } |
293 } |
287 } else if(xstreq(node->name, "propstat")) { |
294 } else if(xstreq(node->name, "propstat")) { |
288 xmlNode *n = node->children; |
295 xmlNode *n = node->children; |
289 xmlNode *prop_node = NULL; |
296 xmlNode *prop_node = NULL; |
290 int ok = 0; |
297 int ok = 0; |