curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: Multiple READFUNCTION callbacks not happening

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 20 Jan 2017 08:07:49 +0100 (CET)

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
Received on 2017-01-20