445 curl_easy_setopt(handle, CURLOPT_INFILESIZE_LARGE, (curl_off_t)length); |
445 curl_easy_setopt(handle, CURLOPT_INFILESIZE_LARGE, (curl_off_t)length); |
446 } else if(length == 0) { |
446 } else if(length == 0) { |
447 struct curl_slist *headers = NULL; |
447 struct curl_slist *headers = NULL; |
448 headers = curl_slist_append(headers, "Transfer-Encoding: chunked"); |
448 headers = curl_slist_append(headers, "Transfer-Encoding: chunked"); |
449 curl_easy_setopt(handle, CURLOPT_HTTPHEADER, headers); |
449 curl_easy_setopt(handle, CURLOPT_HTTPHEADER, headers); |
|
450 } else { |
|
451 curl_easy_setopt(handle, CURLOPT_INFILESIZE_LARGE, (curl_off_t)length); |
450 } |
452 } |
451 |
453 |
452 curl_easy_setopt(handle, CURLOPT_READFUNCTION, read_func); |
454 curl_easy_setopt(handle, CURLOPT_READFUNCTION, read_func); |
453 curl_easy_setopt(handle, CURLOPT_READDATA, data); |
455 curl_easy_setopt(handle, CURLOPT_READDATA, data); |
454 |
456 |