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 |