Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

How to handle error in SOAP::Transport::HTTP::Daemon

by physi (Friar)
on Nov 15, 2010 at 16:16 UTC ( [id://871502]=perlquestion: print w/replies, xml ) Need Help??

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--
-----------------------------------

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://871502]
Approved by dorko
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (4)
As of 2026-02-15 16:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.