Tuesday, July 15, 2008

curb to github

I've made a few more improvements to curb and decided keeping track of all these patches is too much. I'm now tracking my changes on github, and hopefully the curb author will reappear to review the changes soon, so we can get them released in gem form.

2 comments:

Anonymous said...

I'm having a problem with curb:

c = Curl::Easy.new(somefile)
c.on_progress { |a,b,c,d| puts b }
c.perform

I'm always getting "Operation was aborted by an application callback (Curl::Err:AbortedByCallbackError)

I'm new to ruby and programming - could you please tell me what I'm doing wrong here?

tia jeff

todd said...

Hi Anonymous,


Well, it's a subtle thing about libcurl that in your handlers, either on_body, on_header, or on_progress each have specifics about their return value. For example, in your case the on_progress handler must return true otherwise curb will abort the transfer.


Have a look here:
on_progress docs

Reading list