309 DavResourceData *data = (DavResourceData*)res->data; |
309 DavResourceData *data = (DavResourceData*)res->data; |
310 |
310 |
311 // add basic properties |
311 // add basic properties |
312 char *value; |
312 char *value; |
313 |
313 |
314 UcxKey cl_key = dav_property_key("DAV:", "getcontentlength"); |
314 sstr_t cl_keystr = dav_property_key("DAV:", "getcontentlength"); |
|
315 UcxKey cl_key = ucx_key(cl_keystr.ptr, cl_keystr.length); |
315 value = ucx_map_get(data->properties, cl_key); |
316 value = ucx_map_get(data->properties, cl_key); |
316 if(value) { |
317 if(value) { |
317 ucx_map_put(new_properties, cl_key, value); |
318 ucx_map_put(new_properties, cl_key, value); |
318 } |
319 } |
319 |
320 |
320 UcxKey cd_key = dav_property_key("DAV:", "creationdate"); |
321 sstr_t cd_keystr = dav_property_key("DAV:", "creationdate"); |
|
322 UcxKey cd_key = ucx_key(cd_keystr.ptr, cd_keystr.length); |
321 value = ucx_map_get(data->properties, cd_key); |
323 value = ucx_map_get(data->properties, cd_key); |
322 if(value) { |
324 if(value) { |
323 ucx_map_put(new_properties, cd_key, value); |
325 ucx_map_put(new_properties, cd_key, value); |
324 } |
326 } |
325 |
327 |
326 UcxKey lm_key = dav_property_key("DAV:", "getlastmodified"); |
328 sstr_t lm_keystr = dav_property_key("DAV:", "getlastmodified"); |
|
329 UcxKey lm_key = ucx_key(lm_keystr.ptr, lm_keystr.length); |
327 value = ucx_map_get(data->properties, lm_key); |
330 value = ucx_map_get(data->properties, lm_key); |
328 if(value) { |
331 if(value) { |
329 ucx_map_put(new_properties, lm_key, value); |
332 ucx_map_put(new_properties, lm_key, value); |
330 } |
333 } |
331 |
334 |
332 UcxKey ct_key = dav_property_key("DAV:", "getcontenttype"); |
335 sstr_t ct_keystr = dav_property_key("DAV:", "getcontenttype"); |
|
336 UcxKey ct_key = ucx_key(ct_keystr.ptr, ct_keystr.length); |
333 value = ucx_map_get(data->properties, ct_key); |
337 value = ucx_map_get(data->properties, ct_key); |
334 if(value) { |
338 if(value) { |
335 ucx_map_put(new_properties, ct_key, value); |
339 ucx_map_put(new_properties, ct_key, value); |
336 } |
340 } |
337 |
341 |
338 UcxKey rt_key = dav_property_key("DAV:", "resourcetype"); |
342 sstr_t rt_keystr = dav_property_key("DAV:", "resourcetype"); |
|
343 UcxKey rt_key = ucx_key(rt_keystr.ptr, rt_keystr.length); |
339 value = ucx_map_get(data->properties, rt_key); |
344 value = ucx_map_get(data->properties, rt_key); |
340 if(value) { |
345 if(value) { |
341 ucx_map_put(new_properties, rt_key, value); |
346 ucx_map_put(new_properties, rt_key, value); |
342 } |
347 } |
343 |
348 |
344 UcxKey cn_key = dav_property_key(DAV_NS, "crypto-name"); |
349 sstr_t cn_keystr = dav_property_key(DAV_NS, "crypto-name"); |
|
350 UcxKey cn_key = ucx_key(cn_keystr.ptr, cn_keystr.length); |
345 value = ucx_map_get(data->properties, cn_key); |
351 value = ucx_map_get(data->properties, cn_key); |
346 if(value) { |
352 if(value) { |
347 ucx_map_put(new_properties, cn_key, value); |
353 ucx_map_put(new_properties, cn_key, value); |
348 } |
354 } |
349 |
355 |
350 UcxKey ck_key = dav_property_key(DAV_NS, "crypto-key"); |
356 sstr_t ck_keystr = dav_property_key(DAV_NS, "crypto-key"); |
|
357 UcxKey ck_key = ucx_key(ck_keystr.ptr, ck_keystr.length); |
351 value = ucx_map_get(data->properties, ck_key); |
358 value = ucx_map_get(data->properties, ck_key); |
352 if(value) { |
359 if(value) { |
353 ucx_map_put(new_properties, ck_key, value); |
360 ucx_map_put(new_properties, ck_key, value); |
354 } |
361 } |
355 |
362 |
356 UcxKey ch_key = dav_property_key(DAV_NS, "crypto-hash"); |
363 sstr_t ch_keystr = dav_property_key(DAV_NS, "crypto-hash"); |
|
364 UcxKey ch_key = ucx_key(ch_keystr.ptr, ch_keystr.length); |
357 value = ucx_map_get(data->properties, ch_key); |
365 value = ucx_map_get(data->properties, ch_key); |
358 if(value) { |
366 if(value) { |
359 ucx_map_put(new_properties, ch_key, value); |
367 ucx_map_put(new_properties, ch_key, value); |
360 } |
368 } |
361 |
369 |