Hello there,
We use a handful of web services in running our ecommerce site, and they
use ns_httpspost (from https.tcl) to post SOAP data. Since this one
integration went live about 6 months ago, we've been noticing that
occasionally a request would hang up the page. What I notice is that
aolserver triggers the following error in our logs while posting the
request:
Warning: nsopenssl (instancename): SSL write interrupted: unexpected eof
This error doesn't bubble up to ns_httpsopen in a way that it can catch,
so that function then waits forever for a response from the server.
Unrequited SOAP is so tragic...
As an aside, I'm using the nsopenssl I picked up from SourceForge --
called "nsopenssl-3.0beta26". Is that the best choice?
I did some digging and realized that the "unexpected eof" message is
triggered when SSL_write (in NsOpenSSLConnOp) returns 0, which it's
doing because it's told to write 0 bytes by ChanOutputProc. This only
happens intermittently, so I assume the data being posted is some magic
length. It would probably be best to figure out why that function is
being called when there's no data left to write, but I went with a
really simple fix that prevents NsOpenSSLConnOp from being called in
that case. Patch attached.
Thanks,
Haig
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to
<lists...@listserv.aol.com> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject:
field of your email blank.
diff -Naur nsopenssl-3.0beta26/tclcmds.c nsopenssl-3.0beta26-eoffix/tclcmds.c
--- nsopenssl-3.0beta26/tclcmds.c 2004-06-13 00:21:31.000000000 -0400
+++ nsopenssl-3.0beta26-eoffix/tclcmds.c 2011-02-24 15:40:36.000000000
-0500
@@ -1580,7 +1580,9 @@
ChanInfo *chaninfo = (ChanInfo *) arg;
int rc = 0;
- rc = NsOpenSSLConnOp(chaninfo->sslconn->ssl, (void *) buf, towrite,
NSOPENSSL_SEND);
+ if (towrite > 0) {
+ rc = NsOpenSSLConnOp(chaninfo->sslconn->ssl, (void *) buf,
towrite, NSOPENSSL_SEND);
+ }
return rc;
}
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to
<lists...@listserv.aol.com> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject:
field of your email blank.