Bug 216133

Summary: www/p5-HTTP-Daemon-SSL: broken with perl 5.24
Product: Ports & Packages Reporter: Fred Micallef <fm>
Component: Individual Port(s)Assignee: Walter Schwarzenfeld <w.schwarzenfeld>
Status: Closed Feedback Timeout    
Severity: Affects Many People CC: amd64, delgod, girgen, w.schwarzenfeld
Priority: ---    
Version: Latest   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
update to 1.05_01 using diff (since file is not easily fetchable) none

Description Fred Micallef 2017-01-16 07:44:51 UTC
The latest pkg updates perl to 5.24, and the p5-HTTP-Daemon-SSL package is now broken. Everything would work with perl 5.20 (previous pkg version).

The example script provided in the perl module documentation (see below) crashes with the following error message:

> Bad arg length for Socket::inet_ntoa, length is 16, should be 4 at 
> /usr/local/lib/perl5/site_perl/HTTP/Daemon.pm line 51.

Previously, the very same error would happen with Perl5 IPv6 socket modules installed, and a possible workaround was manually uninstalling the following packages: p5-IO-Socket-INET6, p5-Socket, p5-Socket6, p5-IO-Socket-IP.


Script example:

use HTTP::Daemon::SSL;
use HTTP::Status;

# Make sure you have a certs/ directory with "server-cert.pem"
# and "server-key.pem" in it before running this!
my $d = HTTP::Daemon::SSL->new || die;
print "Please contact me at: <URL:", $d->url, ">\n";
while (my $c = $d->accept) {
    while (my $r = $c->get_request) {
        if ($r->method eq 'GET' and $r->url->path eq "/dir") {
            # remember, this is *not* recommened practice :-)
            $c->send_file_response("f.html");
        } else {
            $c->send_error(RC_FORBIDDEN);
        }
    }
    $c->close;
    undef($c);
}
Comment 1 Palle Girgensohn freebsd_committer freebsd_triage 2017-01-16 17:34:14 UTC
Hi,

The upstreams package has not been updated since 2009. Is it reasonable to still expect it to work, or even make it work, with modern versions of Perl?
Comment 2 Walter Schwarzenfeld freebsd_triage 2018-03-14 07:03:07 UTC
ping!
Comment 3 Palle Girgensohn freebsd_committer freebsd_triage 2018-03-14 16:33:22 UTC
Created attachment 191500 [details]
update to 1.05_01 using diff (since file is not easily fetchable)

Hi,

According to http://search.cpan.org/~aufflick/HTTP-Daemon-SSL/SSL.pm there is a later version 1.05_01

It is also very old, from 2009, but you could try it. For some reason it is not "properly" released in CPAN.

Try it and see if the patch helps.

Otherwise I suggest deprecating the port. Are there working alternatives?

Palle
Comment 4 Walter Schwarzenfeld freebsd_triage 2019-08-28 10:01:37 UTC
Close here with feedback timeout! Please, reopen with there are still problems.