curb
curb copied to clipboard
Curl::Easy seems to have a limit for CURLOPT_INFILESIZE in Curl::Easy#http_put
the error i get:
integer 3154698240 too big to convert to 'int'
line 829 in curb_easy.c:
curl_easy_setopt(curl, CURLOPT_INFILESIZE, FIX2INT(size));
in ruby's numeric.c
line 1599 check_int(num)
line 1646 rb_fix2int(val)
curl_easy_setopt seems to take a long but on systems where int < long the most you will get is long. there is fix2uint but still smaller than long.
what is a good way to get a long out of stat.size? or is there a way in Curb to upload this big of a file?
I'm just curious - isn't one of the problems here?
curb_upload.h:
/*
* Maintain the state of an upload e.g. for putting large streams with very little memory
* out to a server. via PUT requests
*/
typedef struct {
VALUE stream;
size_t offset;
} ruby_curl_upload;
curl_easy_setopt(curl, CURLOPT_INFILESIZE, FIX2LONG(size));
?
check my latest commit
thanks!
i'll give it 0.7.9 a roll