RE: SSL closed connection problem

Hi,

I do not understand the whole code, but while patching my code base, I found
the static variable "reusingChannel". It seems to me that the vaiable passes
a flag to HTHost_newWParse() used in HTHost_connect().
This might be kinda unsafe as another host may have changed the state in
between HTHost _new() and HTHost_connect().

What do you think?

Jens


-----Original Message-----
From: Attila Uhljar [mailto:attila.uhljar@intervoice-brite.com]
Sent: Dienstag, 3. April 2001 14:14
To: www-lib@w3.org
Subject: SSL closed connection problem


Hi,

I'm having problems w/ SSL HTTP transactions (GETs) against a secure
site (Netscape server). After a while (say a couple of hours of load
test), the transactions begin to fail more and more frequently,
apparently because the server closes the connection prematurely. I get
no data (chunk->data is NULL), but there's no error code coming from
libwww/libssl either.
When monitoring the TCP connection I saw that there is always a FIN
flag coming from the server before the transaction gets completed
(sometimes after some data is received, sometimes right after I send the
request; I know because I'm retrieving the same data), and that triggers
the following section in HTSSLReader.c (status is almost always
SSL_ERROR_ZERO_RETURN)

 switch (status) {
    ...
    case SSL_ERROR_ZERO_RETURN:
    case SSL_ERROR_SSL:
    case SSL_ERROR_SYSCALL:
	HTTRACE(PROT_TRACE, "HTSSLReader. FIN received on socket %d\n" _
soc);
                HTHost_unregister(host, net, HTEvent_READ);
                HTHost_register(host, net, HTEvent_CLOSE);

                HTSSL_close(me->htssl);    
                HTSSL_free(me->htssl);
                me->htssl = NULL;

                return HT_CLOSED;

Unfortunately I cannot tell whether this behaviour is a result of an
error at the server's side, error in OpenSSL or in LibSSL. 
I'm using libwww5.3.2 (patched), libssl 1.0.1 and openssl 0.9.6 on
WinNT 4.0, non-blocking sockets.

Any help or idea is welcome!
Thanks,
Attila

Received on Tuesday, 3 April 2001 21:54:41 UTC