libidav/methods.c

changeset 87
5360027fb282
parent 49
2f71f4ee247a
equal deleted inserted replaced
86:8e7c57c23133 87:5360027fb282
1035 data = buf; 1035 data = buf;
1036 read_func = (dav_read_func)cxBufferRead; 1036 read_func = (dav_read_func)cxBufferRead;
1037 curl_easy_setopt(handle, CURLOPT_INFILESIZE_LARGE, (curl_off_t)length); 1037 curl_easy_setopt(handle, CURLOPT_INFILESIZE_LARGE, (curl_off_t)length);
1038 } else if(length == 0) { 1038 } else if(length == 0) {
1039 headers = curl_slist_append(headers, "Transfer-Encoding: chunked"); 1039 headers = curl_slist_append(headers, "Transfer-Encoding: chunked");
1040 curl_easy_setopt(handle, CURLOPT_INFILESIZE_LARGE, (curl_off_t)1); 1040 curl_easy_setopt(handle, CURLOPT_INFILESIZE_LARGE, (curl_off_t)-1);
1041 curl_easy_setopt(handle, CURLOPT_HTTPHEADER, headers); 1041 curl_easy_setopt(handle, CURLOPT_HTTPHEADER, headers);
1042 } else { 1042 } else {
1043 curl_easy_setopt(handle, CURLOPT_INFILESIZE_LARGE, (curl_off_t)length); 1043 curl_easy_setopt(handle, CURLOPT_INFILESIZE_LARGE, (curl_off_t)length);
1044 } 1044 }
1045 1045

mercurial