curl-library
Re: Problem found testing the sample code
Date: Thu, 28 Apr 2016 10:02:17 +0200 (CEST)
On Wed, 27 Apr 2016, lyx wrote:
> I'm testing libcurl sample code in my ubuntu. This code is as listed in
> https://curl.haxx.se/libcurl/c/sendrecv.html. I copied it from above webpage
> and compiled in my ubuntu. I enabled VERBOS option and changed the URL to
> https://www.baidu.com to test customized send and recv under https protocol.
> I find the sample code worked sometimes I run it while failed to work in
> other times.
Then please give us more details (what the problems are, which libcurl version
you're using on what platform and what TLS backend you use). I tried it now
against my own HTTPS site and it seemed to behave fine many times in a row.
> The sample code will not display any https reply or can only
> display part of the reply.
The sample code doesn't display any request nor response, correct. That's by
design. It's only a small (and silly) example.
> If I only use curl_easy_perform to test this website without using recv and
> send function, it worked every time.
You should also be aware that we *strongly* discourage the use of
curl_easy_recv and curl_easy_send if you intend to use one of the protocols
libcurl already supports.
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.htmlReceived on 2016-04-28