Skip Menu |

This queue is for tickets about the HTTP-Server-Simple CPAN distribution.

Report information
The Basics
Id: 130448
Status: new
Priority: 0/
Queue: HTTP-Server-Simple

Owner: Nobody in particular
Requestors: jason [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Subject: Bad arg length for Socket::sockaddr_family, length is 0, should be at least 2
Date: Wed, 4 Sep 2019 09:33:28 -0700
To: " bug-HTTP-Server-Simple [...]" <bug-HTTP-Server-Simple [...]>
From: Hermann Calabria <jason [...]>
Download (untitled) / with headers
text/plain 1.8k
While using Perl Dancer under development mode, HTTP::Server::Simple crashes under perl 5.26.2. This happens very intermittently (as in rarely), but when it does, I get this: Use of uninitialized value in subroutine entry at /home/jason/perl5/perlbrew/perls/perl-5.26.2/lib/site_perl/5.26.2/HTTP/Server/ line 397. Bad arg length for Socket::sockaddr_family, length is 0, should be at least 2 at /home/jason/perl5/perlbrew/perls/perl-5.26.2/lib/site_perl/5.26.2/HTTP/Server/ line 397. jason@bear:~/foo/bar$ I just restart my app and everything works well for awhile, until it crashes again. This is an annoyance more than anything, but should probably be fixed. FYI … ./HTTP/Server/, near line 397: sub _process_request { my $self = shift; # Create a callback closure that is invoked for each incoming request; # the $self above is bound into the closure. sub { $self->stdio_handle(*STDIN) unless $self->stdio_handle; # Default to unencoded, raw data out. # if you're sending utf8 and latin1 data mixed, you may need to override this binmode STDIN, ':raw'; binmode STDOUT, ':raw'; # The ternary operator below is to protect against a crash caused by IE # Ported from Catalyst::Engine::HTTP (Originally by Jasper Krogh and Peter Edwards) # (, 5221 ) my $remote_sockaddr = getpeername( $self->stdio_handle ); my $family = sockaddr_family($remote_sockaddr); ################# <====== LINE 397 my ( $iport, $iaddr ) = $remote_sockaddr ? ( ($family == AF_INET6) ? sockaddr_in6($remote_sockaddr) : sockaddr_in($remote_sockaddr) ) : (undef,undef); …

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to