curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Too many calls to the write callback

From: Henrik Holst via curl-library <curl-library_at_lists.haxx.se>
Date: Tue, 8 Feb 2022 19:45:07 +0100

Yes you are correct, I can see it with -v
< Transfer-Encoding: chunked

Well that answers that one, huge thanks!

/HH

Den tis 8 feb. 2022 kl 19:42 skrev Ray Satiro via curl-library <
curl-library_at_lists.haxx.se>:

> On 2/8/2022 12:42 PM, Henrik Holst via curl-library wrote:
> >
> > As you can see above recvfrom returns with 562 bytes and then I get 9
> > calls to write_callback from that, so the chunking is not due to the
> > network transfer but happens inside curl. Due to the varying sizes
> > this is not due to hitting some buffer limit (or we would not trigger
> > on 9 after 38) either.
> >
> > The output here is " write_callback='%.*s' = %lu\n", (int)realsize,
> > ptr, realsize);"
> >
> > I have not changed any of the buffer sizes and this is with libcurl 7.68
>
>
> I can only reproduce that behavior with chunked encoding, as expected.
> Each chunk is separate. Turn on verbose mode and check for chunked
> encoding.
>
> while true; do perl -e 'print ("HTTP/1.1 200 OK\r\nTransfer-Encoding:
> chunked\r\n\r\n3\r\nFOO\r\n3\r\nBAR\r\n0\r\n\r\n")' | nc -4l localhost
> 8000; done
>
>
> --
> Unsubscribe: https://lists.haxx.se/listinfo/curl-library
> Etiquette: https://curl.haxx.se/mail/etiquette.html
>


-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2022-02-08