Re: Multiple READFUNCTION callbacks not happening

2017-01-26 Thread Daniel Stenberg
On Wed, 25 Jan 2017, Pushkar Kulkarni wrote: [1] <= Recv headerHTTP/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

Re: Multiple READFUNCTION callbacks not happening

2017-01-25 Thread Pushkar Kulkarni
Thanks Daniel. I was able to get my tests running with the debug library. I see this output before the actual transfer begins, after the handshake: [1] => Send headerPOST /calls/html/HTMLGetRankedKeywords?apikey= =json=normal HTTP/1.1␍␊Host: gateway-a.watsonplatform.net␍␊Accept:

Re: Multiple READFUNCTION callbacks not happening

2017-01-23 Thread Daniel Stenberg
On Mon, 23 Jan 2017, Pushkar Kulkarni wrote: When I link and run my test case with this debug library, I see a hang and a subsequent timeout, in the SSL handshake that happens before the data transfer. I don't see this hang with the regular libcurl (I use 7.47) That sounds like you hit issue

Re: Multiple READFUNCTION callbacks not happening

2017-01-23 Thread Pushkar Kulkarni
Hi Daniel/Dan, Thanks for your inputs. I decided to try with a debug libcurl. My colleague built a debug libcurl with this source: *https://curl.haxx.se/download/curl-7.52.1.tar.gz * When I link and run my test case with this debug library, I

Re: Multiple READFUNCTION callbacks not happening

2017-01-20 Thread Pushkar Kulkarni
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

Re: Multiple READFUNCTION callbacks not happening

2017-01-19 Thread Daniel Stenberg
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

Re: Multiple READFUNCTION callbacks not happening

2017-01-19 Thread Pushkar Kulkarni
Hi Dan, Thanks for looking into this. My responses to some of the points you made: *> Is the read callback function returning the correct number of bytes it's* *> supplying? Is it returning too many or too few in total compared to what the> program sets with CURLOPT_INFILESIZE? It sounds like

Re: Multiple READFUNCTION callbacks not happening

2017-01-11 Thread Dan Fandrich
On Thu, Jan 12, 2017 at 01:34:04AM +0530, Pushkar Kulkarni wrote: > I am working with the URLSession implementation in open source Swift,which is > based on libcurl. I have a question to ask. But a code snippet is not really > feasible, so kindly bear with me.  I'm not familiar with URLSession so

Multiple READFUNCTION callbacks not happening

2017-01-11 Thread Pushkar Kulkarni
Hello Daniel, others, I am working with the URLSession implementation in open source Swift,which is based on libcurl. I have a question to ask. But a code snippet is not really feasible, so kindly bear with me. An HTTP POST request is made using the CURLOPT_READFUNCTION callback, through which