libidav/methods.c

branch
dav-2
changeset 921
3ffee649f0b1
parent 920
92fcd6a8cf9e
equal deleted inserted replaced
920:92fcd6a8cf9e 921:3ffee649f0b1
1055 curl_easy_setopt(handle, CURLOPT_NOBODY, 0L); 1055 curl_easy_setopt(handle, CURLOPT_NOBODY, 0L);
1056 return ret; 1056 return ret;
1057 } 1057 }
1058 1058
1059 1059
1060 CURLcode do_copy_move_request(DavSession *sn, char *dest, char *lock, DavBool copy, DavBool override) { 1060 CURLcode do_copy_move_request(DavSession *sn, const char *dest, const char *lock, DavBool copy, DavBool override) {
1061 CURL *handle = sn->handle; 1061 CURL *handle = sn->handle;
1062 if(copy) { 1062 if(copy) {
1063 curl_easy_setopt(handle, CURLOPT_CUSTOMREQUEST, "COPY"); 1063 curl_easy_setopt(handle, CURLOPT_CUSTOMREQUEST, "COPY");
1064 } else { 1064 } else {
1065 curl_easy_setopt(handle, CURLOPT_CUSTOMREQUEST, "MOVE"); 1065 curl_easy_setopt(handle, CURLOPT_CUSTOMREQUEST, "MOVE");
1231 free(ltheader.ptr); 1231 free(ltheader.ptr);
1232 1232
1233 return ret; 1233 return ret;
1234 } 1234 }
1235 1235
1236 CURLcode do_simple_request(DavSession *sn, char *method, char *locktoken) { 1236 CURLcode do_simple_request(DavSession *sn, const char *method, char *locktoken) {
1237 CURL *handle = sn->handle; 1237 CURL *handle = sn->handle;
1238 curl_easy_setopt(handle, CURLOPT_CUSTOMREQUEST, method); 1238 curl_easy_setopt(handle, CURLOPT_CUSTOMREQUEST, method);
1239 curl_easy_setopt(handle, CURLOPT_UPLOAD, 0L); 1239 curl_easy_setopt(handle, CURLOPT_UPLOAD, 0L);
1240 1240
1241 curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, dummy_write); 1241 curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, dummy_write);

mercurial