physi has asked for the wisdom of the Perl Monks concerning the following question:

Hi all,

I have a nice running Soap-Server, which can be started in HTTP or HTTPS mode.

When I start this in HTTPS mode, and I telnet on the listening Port, the Server crashes, because of

"SSL connect accept failed because of handshake problemserror:00000000 +:lib(0):func(0):reason(0) ..."

How can i trap this, so that the server stays alive ?
Here's my code snippet:

if ($ssl) { $daemon = SOAP::Transport::HTTP::Daemon -> new (LocalPort => $port, Reuse => 1, SSL_use_cert => 1, SSL_key_file => 'path/to/server.key', SSL_cert_file => 'path/to/server.crt') -> on_action(sub {}) -> dispatch_to('allmy','methodes') ; } $daemon->handle;

When I try this:

eval{ $daemon->handle or warn($!); };

I got the errorcode, but nevertheless the server dies.

When I use HTTP (leave all the SSL tags in the above deamon out) , the Server sends a normal error message and stays alive

HTTP/1.1 400 Bad Request Date: Wed, 03 Nov 2010 10:59:54 GMT Server: libwww-perl-daemon/5.818 Content-Type: text/html Content-Length: 57 <title>400 Bad Request</title> <h1>400 Bad Request</h1>

Thanks in advance for any hint.

Regards Christian
-----------------------------------
--the good, the bad and the physi--
-----------------------------------