Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Curl::Easy seems to have a limit for CURLOPT_INFILESIZE in Curl::Easy#http_put #64

Open
flazz opened this Issue Dec 21, 2010 · 4 comments

Comments

Projects
None yet
3 participants

flazz commented Dec 21, 2010

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?

grf commented Dec 21, 2010

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;
Owner

taf2 commented Dec 22, 2010

  curl_easy_setopt(curl, CURLOPT_INFILESIZE, FIX2LONG(size));

?

Owner

taf2 commented Dec 22, 2010

check my latest commit

flazz commented Dec 22, 2010

thanks!

i'll give it 0.7.9 a roll

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment