Branch Coverage

blib/lib/Starwoman/Server.pm
Criterion Covered Total %
branch 85 160 53.1


line true false branch
40 0 49 if ($options->{'net_server_args'})
44 0 49 if ($options->{'pid'})
47 0 49 if ($options->{'daemonize'})
50 0 49 if ($options->{'error_log'})
56 0 49 if ($options->{'ssl_cert'})
59 0 49 if ($options->{'ssl_key'})
62 49 0 unless (exists $options->{'keepalive'})
65 49 0 unless (exists $options->{'keepalive_timeout'})
68 49 0 unless (exists $options->{'read_timeout'})
71 49 0 unless (exists $options->{'proctitle'})
76 49 0 unless $options->{'listen'}
78 49 0 if ($listen =~ /:/) { }
80 49 0 if $h
82 0 49 if 'ssl' eq lc $opt
108 0 49 $options->{'ssl'} ? :
49 0 $^O =~ /(linux|darwin|bsd|cygwin)$/ ? :
120 0 49 $port->{'proto'} eq 'unix' ? :
0 49 $port->{'proto'} eq 'ssl' ? :
128 0 49 if $self->{'options'}{'server_ready'}
140 0 6 if ($quit)
147 0 0 unless keys %{$$self{'server'}{'children'};}
158 19 0 unless $self->{'options'}{'argv'}
159 19 0 if $self->{'options'}{'proctitle'}
174 0 43 if ($self->{'options'}{'psgi_app_builder'})
180 0 0 unless $_ =~ /Error while loading/
184 43 0 unless $self->{'options'}{'argv'}
185 43 0 if $self->{'options'}{'proctitle'}
205 2 43 if (ref $res eq 'CODE') { }
216 51 0 if ($conn->NS_proto eq 'TCP')
217 0 51 unless setsockopt $conn, 6, 1, 1
222 0 78 unless $conn->connected
225 33 45 unless $self->_read_headers
232 0 45 $conn->NS_proto eq 'SSL' ? :
249 0 45 if ($reqlen == -1)
260 0 45 if ($proto and $proto eq 'HTTP/1.0') { }
45 0 elsif ($proto and $proto eq 'HTTP/1.1') { }
261 0 0 if ($connection and $connection =~ /^keep-alive$/i) { }
270 0 45 if ($connection and $connection =~ /^close$/i) { }
279 0 45 if ($env->{'HTTP_EXPECT'})
280 0 0 if (lc $env->{'HTTP_EXPECT'} eq '100-continue') { }
291 0 45 unless ($env->{'HTTP_HOST'})
299 0 45 unless ($self->{'options'}{'keepalive'})
310 27 18 if ($self->{'client'}{'keepalive'})
312 0 27 if ($self->{'client'}{'inputbuf'})
313 0 0 if ($self->{'client'}{'inputbuf'} =~ /^(?:GET|HEAD)/) { }
336 0 27 unless $sel->can_read($self->{'options'}{'keepalive_timeout'})
355 45 78 if defined $self->{'client'}{'inputbuf'} and $self->{'client'}{'inputbuf'} =~ /$Starwoman::Server::CR?$Starwoman::Server::LF$Starwoman::Server::CR?$Starwoman::Server::LF/s
360 33 45 if (not defined $read or $read == 0)
374 33 45 if ($@)
375 0 33 if ($@ =~ /Timed out/)
380 33 0 if ($@ =~ /Read error/)
415 1 5 if ($self->{'client'}{'inputbuf'})
425 0 46 if (my $cl = $env->{'CONTENT_LENGTH'}) { }
2 44 elsif ($chunked) { }
430 0 0 if (not defined $read or $read == 0)
452 2 18 if ($chunk_len == 0) { }
1 17 elsif (length $chunk_buffer < $chunk_len + 2) { }
465 0 4 unless $read and $read > 0
478 18 27 if ($env->{'psgix.harakiri.commit'})
496 0 45 if $k eq 'Connection'
501 45 0 if ($protocol eq 'HTTP/1.1') { }
502 45 0 if (not exists $headers{'content-length'}) { }
0 0 elsif (my $te = $headers{'transfer-encoding'}) { }
503 44 1 if (not $status =~ /^1\d\d|[23]04$/ and $env->{'REQUEST_METHOD'} ne 'HEAD')
510 0 0 if ($te eq 'chunked')
516 0 0 unless (exists $headers{'content-length'})
522 45 0 unless ($headers{'date'})
527 27 18 if ($self->{'client'}{'keepalive'}) { }
539 43 2 if (defined $res->[2]) { }
542 42 0 if ($chunked)
544 0 42 unless $len
549 42 1 if $chunked
554 3 0 if ($chunked)
556 1 2 unless $len
562 2 0 if $chunked
576 0 133 unless (defined $len)
577 0 0 if $! == 32
578 0 0 if $! == 104
579 0 0 if $! == 4
592 18 33 if ($self->{'client'}{'harakiri'})