Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I've run this through the debugger a few times, without quite figuring out how these parameters are supposed to be passed in, nor why they are missing from $s->{server} where Net::Server::Proto::SSLEAY is expecting them.

That's because the keys SSL_cert_file SSL_key_file are missing from the default structure in sub options from Net/Server.pm line 1338 (as of version 0.99) - it's a bug:

### set up default structure sub options { my $self = shift; my $prop = $self->{server}; my $ref = shift; foreach ( qw(port host proto allow deny cidr_allow cidr_deny) ){ if (! defined $prop->{$_}) { $prop->{$_} = []; } elsif (! ref $prop->{$_}) { $prop->{$_} = [$prop->{$_}]; # nicely turn us into an arrayref i +f we aren't one already } $ref->{$_} = $prop->{$_}; } foreach ( qw(conf_file user group chroot log_level log_file pid_file background setsid listen reverse_lookups syslog_logsock syslog_ident syslog_logopt syslog_facility no_close_by_child no_client_stdout tie_client_stdout tied_stdout_callback + tied_stdin_callback leave_children_open_on_hup ) ){ $ref->{$_} = \$prop->{$_}; } }

Add the keys below leave_children_open_on_hup and presto - it works, at least it doesn't die anymore.

update: I'm not sure whether it's the right place to add those keys, since the machinery of those modules is hard to grasp with little time at hand. Maybe you should file a bug report.


In reply to Re: SSL with HTTP::Server::Simple and Net::Server by shmem
in thread SSL with HTTP::Server::Simple and Net::Server by Tanktalus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
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 2024-04-16 19:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found