curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: Multiple READFUNCTION callbacks not happening

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 26 Jan 2017 17:42:57 +0100 (CET)

On Wed, 25 Jan 2017, Pushkar Kulkarni wrote:

> [1] <= Recv header HTTP/1.1 100 Continue␍
>
> After this a callback occurs and a16K transfer happens. After that we hang
> until the server times out. During the hang, libcurl does not spit out any
> debug statements.
>
> I'm not sure if the output above is providing any information.

Not a whole lot, no. I would need a way to reproduce this in order to debug
the case properly.

Do you have the progress callback set and is that then kept getting called? If
you wireshark the connection, can you see data arriving that libcurl doesn't
tell your application about?

> I'd like to step through the code that invokes the READFUNCTION callback.
> Can you help me by pointing out the relevant source files? This will be my
> first encounter with the libcurl source code!

Well, set a break-point in your callback function and follow it back when it
returns and then you'll see it.

The function in libcurl that sends the data to the application is called
Curl_client_write():

  https://github.com/curl/curl/blob/master/lib/sendf.c#L609

But in your case it seems that the problem is rather that libcurl doesn't
*read* any more data from the network so I think the problem isn't really
related to the calling of the callback.

-- 
  / daniel.haxx.se

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