cURL / Mailing Lists / curl-library / Single Mail


RE: trouble with SSL URL

From: David Byron <>
Date: Wed, 9 Feb 2005 08:45:58 -0800

On Tue, 8 Feb 2005, Daniel Stenberg wrote:

> It looks good (= behaves reasonably close to what libcurl
> does) to me. I take it you can make it work by extending
> the buffer size?

Funny how the simple questions sometimes have hard answers :) It turns
out that the program I sent always hung. I added some logic to do a
poll to check for more data, etc. and I think I came upon the root of
the problem.

I found this function in some example code, and it seems to do the trick
-- SSL_pending. It's possible for SSL to read all the data from a
socket, but not make it all available to SSL_read at once (see So, even if poll or
select returns 0, we've still got to do an SSL_read if SSL_pending says
there are bytes to read.

I'll see if I can find a good place to put this in the curl code.
Anyone else wanna try too?

Received on 2005-02-09