libidav/resource.c

changeset 74
da079dc0724c
parent 70
88092b88ec00
child 75
56962faf2b42
equal deleted inserted replaced
73:41e88442ad4e 74:da079dc0724c
88 res->name[n.length-1] = '\0'; 88 res->name[n.length-1] = '\0';
89 } 89 }
90 90
91 char *path = util_concat_path(parent_path, name); 91 char *path = util_concat_path(parent_path, name);
92 res->path = dav_session_strdup(sn, path); 92 res->path = dav_session_strdup(sn, path);
93 free(path);
94 93
95 res->href = href; 94 res->href = href;
96 95
97 // initialize resource data 96 // initialize resource data
98 res->data = resource_data_new(sn); 97 res->data = resource_data_new(sn);
99 98
100 // cache href/path 99 // cache href/path
101 if(href) { 100 if(href) {
102 dav_session_cache_path(sn, sstr(path), sstr(href)); 101 dav_session_cache_path(sn, sstr(path), sstr(href));
103 } 102 }
103 free(path);
104 104
105 return res; 105 return res;
106 } 106 }
107 107
108 void dav_resource_free(DavResource *res) { 108 void dav_resource_free(DavResource *res) {
486 write_fnc = (dav_write_func)aes_write; 486 write_fnc = (dav_write_func)aes_write;
487 } 487 }
488 } 488 }
489 } 489 }
490 490
491 curl_easy_setopt(handle, CURLOPT_HTTPHEADER, NULL);
491 curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, 0); 492 curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, 0);
492 curl_easy_setopt(handle, CURLOPT_CUSTOMREQUEST, NULL); 493 curl_easy_setopt(handle, CURLOPT_CUSTOMREQUEST, NULL);
493 curl_easy_setopt(handle, CURLOPT_PUT, 0L); 494 curl_easy_setopt(handle, CURLOPT_PUT, 0L);
494 curl_easy_setopt(handle, CURLOPT_UPLOAD, 0L); 495 curl_easy_setopt(handle, CURLOPT_UPLOAD, 0L);
495 496

mercurial