--- a/dav/methods.c Thu Aug 15 11:23:25 2013 +0200 +++ b/dav/methods.c Fri Aug 16 12:41:30 2013 +0200 @@ -453,11 +453,11 @@ curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, dummy_write); curl_easy_setopt(handle, CURLOPT_WRITEDATA, NULL); - CURLcode res = curl_easy_perform(handle); + CURLcode ret = curl_easy_perform(handle); if(buf) { ucx_buffer_free(buf); } - return res; + return ret; } CURLcode do_delete_request(CURL *handle, UcxBuffer *response) { @@ -469,6 +469,19 @@ curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, ucx_buffer_write); curl_easy_setopt(handle, CURLOPT_WRITEDATA, response); - CURLcode res = curl_easy_perform(handle); - return res; + CURLcode ret = curl_easy_perform(handle); + return ret; } + +CURLcode do_mkcol_request(CURL *handle) { + curl_easy_setopt(handle, CURLOPT_CUSTOMREQUEST, "MKCOL"); + curl_easy_setopt(handle, CURLOPT_PUT, 0L); + curl_easy_setopt(handle, CURLOPT_UPLOAD, 0L); + curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, 0); + + curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, dummy_write); + curl_easy_setopt(handle, CURLOPT_WRITEDATA, NULL); + + CURLcode ret = curl_easy_perform(handle); + return ret; +}