curl-library
Re: SSL/TLS: Connection seems dead
Date: Fri, 27 May 2016 10:49:20 +0200 (CEST)
On Wed, 25 May 2016, Igor Gatis wrote:
> 1. Bring up server with Nowin and a valid certificate
> 2. curl -v https://servername/index.html https://servername/index.html
> https://servername/index.html
>
> SSL session is reused in the 2nd GET. But it reports "Connection seems
> dead" on the 3rd GET.
Which libcurl version using which TLS backend is this? Is the server speaking
HTTP/2 ? We've fixed at least two bugs in this area recently.
> I debugged Curl_socket_check in lib/select.c code and found out that
> pfd[num].revents == 65, where POLLRDNORM == 64 and POLLIN == 1. Thus
> Curl_socket_check returns CURL_CSELECT_IN. SocketIsDead returns true which
> causes disconnection.
So libcurl finds out that the socket is readable when it shouldn't be. Then it
can't use it - it was either closed by the remote side or there's data pending
to get read and both are equally bad!
> What can I conclude from there? Is the webserver misbehaving? If so, why?
Try to figure out if there's data to be read from the socket or if it was
indeed closed - wireshark should be able to tell you that. If there's data, it
could be a bug in either end. If it was closed, it feels more likely to be a
server issue.
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.htmlReceived on 2016-05-27