Branch Coverage

blib/lib/HTTP/Server/PSGI.pm
Criterion Covered Total %
branch 29 68 42.6


line true false branch
25 0 39 if ($^O eq 'MSWin32') { }
55 0 37 $args{'listen_sock'} ? :
69 0 0 if ($self->{'ssl'} and $self->{'ipv6'})
73 0 37 if ($self->{'ssl'}) { }
0 37 elsif ($self->{'ipv6'}) { }
74 0 0 unless eval { do { require IO::Socket::SSL; 1 } }
80 0 0 unless eval { do { require IO::Socket::IP; 1 } }
103 0 37 unless $class->new(%args)
107 0 37 $self->{'ssl'} ? :
117 740 0 if (my $conn = $self->{'listen_sock'}->accept)
118 740 0 if (defined 1)
119 0 740 unless $conn->setsockopt(6, 1, 1)
130 0 740 $self->{'ssl'} ? :
143 0 703 if $env->{'psgix.harakiri.commit'}
158 37 703 unless my $rlen = $self->read_timeout($conn, \$buf, 131072 - length($buf), length $buf, $self->{'timeout'})
160 703 0 if ($reqlen >= 0)
162 74 629 if (my $cl = $env->{'CONTENT_LENGTH'}) { }
166 0 108 if (length $buf) { }
171 0 108 unless $self->read_timeout($conn, \$chunk, $cl, 0, $self->{'timeout'})
185 0 0 if ($reqlen == -2) { }
0 0 elsif ($reqlen == -1) { }
193 666 0 if (ref $res eq 'ARRAY') { }
0 0 elsif (ref $res eq 'CODE') { }
223 0 666 unless $self->write_all($conn, join("", @lines), $self->{'timeout'})
225 666 0 if (defined $res->[2]) { }
235 0 721 unless $self->write_all($conn, $_[0], $self->{'timeout'})
242 0 666 unless ($done)
243 0 0 if ($err =~ /^failed to send all data\n/) { }
264 2198 37 if ($ret = &$cb()) { }
37 0 elsif (not !defined($ret) && $! == 4) { }
272 0 0 if $left <= 0
294 0 1387 unless defined $buf
298 0 1387 unless my $ret = $self->write_timeout($sock, $buf, $len, $off, $timeout)
307 0 1387 if ($_[0] =~ /[^\x00-\xff]/)