curl file size for uploads not set correctly on 64-bit
Status: Alpha
Brought to you by:
braga
This is being set in curl as 4294967295, causing every flush to return an error:
curl_easy_setopt_or_die(fh->write_conn, CURLOPT_INFILESIZE, -1);
Changing it to the following fixes it:
curl_easy_setopt_or_die(fh->write_conn, CURLOPT_INFILESIZE, (curl_off_t)-1);
I suspect the "-1" is 64 bits in size, and curl is only using the lower 32 bits, whereas casting it to curl_off_t will use the correct size.