cURL / Mailing Lists / curl-users / Single Mail

curl-users

HP-UX Saga

From: Moffet, Scott <SMoffet_at_linkpoint.com>
Date: Tue, 26 Nov 2002 12:00:00 -0800

I've compiled libcURL for HP-UX 11.00 using OpenSSL 0.9.6g with the HP aCC compiler. I'm having an odd problem I was hoping someone could help me with.

First, a few details about my server application.

Client requests are received in XML and parsed into separate fields. The XML fields are then used to populate an HTML form and it is posted as an HTTPS POST to a web server through libcURL. libcURL receives the response page, which I then parse for the response data and build an XML response string.

MULTIPLE TRANSACTION MAY OCCUR FROM MULTIPLE THREADS!

The problem I'm having is that, 50-80% of the transactions work fine. The other 20-50% fail. libcURL receives a portion of the page (it varies from 50% to 100%) and quits. If I haven't received the entire page, I miss the digital signature. If I edit the libcURL code and change it to use blocking sockets, 100% of the transactions work, but acts as if it is single threaded.

I added some debugging messages to the libcURL code and found that when non-blocking sockets are used, OpenSSL will sometimes return SSL_ERROR_SYSCALL with errno set to EAGAIN. The problem is that errno is a global variable and one thread may change it before another thread looks at it. At least, that is how it appears.

Does anyone have any suggestions on how I can fix this problem. Note that in a single threaded application, everything works fine.

Thanks

-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T
handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
Received on 2002-11-26