dav/methods.c

changeset 29
938957a4eea7
parent 27
e584c351b402
equal deleted inserted replaced
28:4e46c65711ef 29:938957a4eea7
498 curl_easy_setopt(handle, CURLOPT_WRITEDATA, NULL); 498 curl_easy_setopt(handle, CURLOPT_WRITEDATA, NULL);
499 499
500 CURLcode ret = curl_easy_perform(handle); 500 CURLcode ret = curl_easy_perform(handle);
501 return ret; 501 return ret;
502 } 502 }
503
504
505 CURLcode do_head_request(CURL *handle) {
506 curl_easy_setopt(handle, CURLOPT_CUSTOMREQUEST, "HEAD");
507 curl_easy_setopt(handle, CURLOPT_PUT, 0L);
508 curl_easy_setopt(handle, CURLOPT_UPLOAD, 0L);
509 curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, 0);
510 curl_easy_setopt(handle, CURLOPT_NOBODY, 1L);
511
512 curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, dummy_write);
513 curl_easy_setopt(handle, CURLOPT_WRITEDATA, NULL);
514
515 CURLcode ret = curl_easy_perform(handle);
516 curl_easy_setopt(handle, CURLOPT_NOBODY, 0L);
517 return ret;
518 }

mercurial