in reply to HTTP::Daemon::SSL based server dieing when http is requested
From documentation:
The accept() method will return when a connection from a client is available. In a scalar context the returned value will be a reference to a object of the HTTP::Daemon::ClientConn::SSL class which is another IO::Socket::SSL subclass.So if connection isn't SSL accept returns udef as HTTP::Daemon::ClientConn::SSL object wasn't created and your loop stops.
Update: this works:
while () { my $c = $d->accept or next; while ( my $r = $c->get_request ) { $c->send_file_response('./index.html'); } $c->close; undef($c); }
|
|---|