curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: Multiple READFUNCTION callbacks not happening

From: Pushkar Kulkarni <pushkar.rvce_at_gmail.com>
Date: Fri, 20 Jan 2017 14:16:47 +0530

Hi Daniel,

Thanks for the prompt response.

>> Hm. Which version of libcurl is this? Can you try to set
CURLOPT_POSTFIELDSIZE instead of CURLOPT_INFILESIZE >> for the POST size?
That's what post-callback.c does... (I would expect them to work the same
in 7.43.0 or later but who >> knows for sure!)
Yes, I did try setting CURLOPT_POSTFIELDSIZE. I see the same behaviour :-(
I am using libcurl 7.47.0 on Ubuntu 16.04.

>> It'll be much more helpful if you posted a stand-alone example that
reproduces the problem. Possibily by changing the >> post-callback.c
example to work more like your code.
I'll try to work on this.

Thanks again,
Pushkar

On Fri, Jan 20, 2017 at 12:37 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:

> On Fri, 20 Jan 2017, Pushkar Kulkarni wrote:
>
> If for a payload of 23K, we set the CURLOPT_INFILESIZE to 23K, we get only
>> one callback with size*nmemb = 16K. There are no subsequent callbacks and
>> hence the server keeps waiting before timing out.
>>
>
> Hm. Which version of libcurl is this? Can you try to set
> CURLOPT_POSTFIELDSIZE instead of CURLOPT_INFILESIZE for the POST size?
> That's what post-callback.c does... (I would expect them to work the same
> in 7.43.0 or later but who knows for sure!)
>
> Do let me know if you need more clarity on the code.
>>
>
> It'll be much more helpful if you posted a stand-alone example that
> reproduces the problem. Possibily by changing the post-callback.c example
> to work more like your code.
>
> Is there a way to dump all the options set on an easy handle? Though the
>> programmer must know what option he/she's setting, I am wondering if
>> there's a way to have it as a debug output.
>>
>
> No there isn't. But I'll agree that such a function would be really handy
> at times...
>
> --
>
> / daniel.haxx.se
> -------------------------------------------------------------------
> Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
> Etiquette: https://curl.haxx.se/mail/etiquette.html

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-01-20