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: response reading failed

From: Daniel Stenberg via curl-library <curl-library_at_cool.haxx.se>
Date: Tue, 27 Aug 2019 13:26:39 +0200 (CEST)

On Tue, 27 Aug 2019, Christian Schmitz via curl-library wrote:

> I see that Curl_pp_readresp is the only place this error message is made.
>
> else if(gotbytes <= 0) {
> keepon = FALSE;
> result = CURLE_RECV_ERROR;
> failf(data, "response reading failed");
>
>
> Is it possible we could have some data coming in on SSL level and not yet a
> full decrypted byte, so gotbytes can be zero as data is still coming?

If we exclude that there are bugs present, the theory is that Curl_read()
returns CURLE_AGAIN if there's more data coming that just couldn't be read
right now (and the check for that return value is just a dozen lines above the
code snippet quoted above). All other cases of negative values in 'gotbytes'
mean there was an error when recving.

If you can reproduce, you can of course break-point or printf-debug those
underlying functions to get more in-depth details about the particular
failure. If your curl uses OpenSSL, lib/vtsl/openssl.c:ossl_recv() will be
interesting!

-- 
  / daniel.haxx.se | Get the best commercial curl support there is - from me
                   | Private help, bug fixes, support, ports, new features
                   | https://www.wolfssl.com/contact/
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2019-08-27