cURL / Mailing Lists / curl-library / Single Mail

curl-library

What happened to this old issue - "Libcurl stops when sending lots of https messages"

From: Mehmet Bozkurt <mehmet.bozkurt_at_xware.se>
Date: Fri, 13 Sep 2013 07:44:57 +0200

Hi everyone!

We incorporated a suggested patch in our product to handle the case of
hangs occurring when running heavy traffic over HTTPS using libcurl.

The original issue was posted here (actually this link is the last reply
in the thread and contains the fix proposal):
http://curl.haxx.se/mail/lib-2009-11/0191.html

The issue was caused by the fact that OpenSSL returns
SSL_ERROR_WANT_WRITE on a call to SSL_read, but libcurl then waits on
select(), sees that a sockets becomes writable and calls SSL_write, as
opposed to calling SSL_read again as the documentation for OpenSSL
suggests. The suggested fix takes this into account and correctly forces
a call to SSL_read.

However, this was in a rather old libcurl release 7.19.7. I've tried to
reproduce the error on the latest libcurl but I'm having trouble doing
so. None the less, comparing the code for Curl_readwrite in transfer.c,
the function seems not to have changed all that much. So what I'm asking
is if libcurl handles SSL_ERROR_WANT_READ/WRITE by calling the same
OpenSSL method that caused the error return or is the strategy still as
in the old version; libcurl makes a call based on whatever select() returns?

Thank you,
Mehmet.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-09-13