Branch Coverage

blib/lib/Starman/Server.pm
Criterion Covered Total %
branch 94 160 58.7


line true false branch
38 0 83 if ($options->{'net_server_args'})
42 0 83 if ($options->{'pid'})
45 0 83 if ($options->{'daemonize'})
48 0 83 if ($options->{'error_log'})
54 0 83 if ($options->{'ssl_cert'})
57 0 83 if ($options->{'ssl_key'})
60 83 0 unless (exists $options->{'keepalive'})
63 83 0 unless (exists $options->{'keepalive_timeout'})
66 83 0 unless (exists $options->{'read_timeout'})
69 83 0 unless (exists $options->{'proctitle'})
74 83 0 unless $options->{'listen'}
76 83 0 if ($listen =~ /:/) { }
78 83 0 if $h
80 0 83 if defined $opt and lc $opt eq "ssl"
106 0 83 $options->{'ssl'} ? :
83 0 $^O =~ /(linux|darwin|bsd|cygwin)$/ ? :
118 0 83 $port->{'proto'} eq 'unix' ? :
0 83 $port->{'proto'} eq 'ssl' ? :
126 0 83 if $self->{'options'}{'server_ready'}
138 0 11 if ($quit)
145 0 0 unless keys %{$$self{"server"}{"children"};}
156 28 0 unless $self->{'options'}{'argv'}
157 28 0 if $self->{'options'}{'proctitle'}
172 0 72 if ($self->{'options'}{'psgi_app_builder'})
176 72 0 unless $self->{'options'}{'argv'}
177 72 0 if $self->{'options'}{'proctitle'}
197 5 83 if (ref $res eq 'CODE') { }
208 63 0 if ($conn->NS_proto eq "TCP")
209 0 63 unless setsockopt $conn, 6, 1, 1
214 0 131 unless $conn->connected
217 43 88 unless $self->_read_headers
238 0 88 $conn->NS_proto eq 'SSL' ? :
242 0 88 if ($reqlen == -1)
253 0 88 if ($proto and $proto eq 'HTTP/1.0') { }
88 0 elsif ($proto and $proto eq 'HTTP/1.1') { }
254 0 0 if ($connection and $connection =~ /^keep-alive$/i) { }
263 0 88 if ($connection and $connection =~ /^close$/i) { }
272 1 87 if ($env->{'HTTP_EXPECT'})
273 1 0 if (lc $env->{'HTTP_EXPECT'} eq '100-continue') { }
284 0 88 unless ($env->{'HTTP_HOST'})
292 0 88 unless ($self->{'options'}{'keepalive'})
303 68 20 if ($self->{'client'}{'keepalive'})
305 0 68 if ($self->{'client'}{'inputbuf'} ne "")
306 0 0 if ($self->{'client'}{'inputbuf'} =~ /^(?:GET|HEAD)/) { }
329 0 68 unless $sel->can_read($self->{'options'}{'keepalive_timeout'})
348 88 133 if $self->{'client'}{'inputbuf'} ne "" and $self->{'client'}{'inputbuf'} =~ /$Starman::Server::CR?$Starman::Server::LF$Starman::Server::CR?$Starman::Server::LF/s
353 43 90 if (not defined $read or $read == 0)
367 43 88 if ($@)
368 0 43 if ($@ =~ /Timed out/)
373 43 0 if ($@ =~ /Read error/)
408 4 12 if ($self->{'client'}{'inputbuf'} ne "")
418 4 85 if (my $cl = $env->{'CONTENT_LENGTH'}) { }
3 82 elsif ($chunked) { }
423 0 5 if (not defined $read or $read == 0)
445 3 23 if ($chunk_len == 0) { }
1 22 elsif (length $chunk_buffer < $chunk_len + 2) { }
458 0 8 unless $read and $read > 0
471 20 68 if ($env->{'psgix.harakiri.commit'})
489 0 101 if $k eq "Connection"
494 88 0 if ($protocol eq 'HTTP/1.1') { }
495 84 4 if (not exists $headers{'content-length'}) { }
0 4 elsif (my $te = $headers{'transfer-encoding'}) { }
496 82 2 if (not $status =~ /^1\d\d|[23]04$/ and $env->{'REQUEST_METHOD'} ne "HEAD")
503 0 0 if ($te eq "chunked")
509 0 0 unless (exists $headers{'content-length'})
515 88 0 unless ($headers{'date'})
520 68 20 if ($self->{'client'}{'keepalive'}) { }
532 84 4 if (defined $res->[2]) { }
535 81 4 if ($chunked)
537 0 81 unless $len
542 78 6 if $chunked
547 6 0 if ($chunked)
549 1 5 unless $len
555 4 0 if $chunked
569 0 262 unless (defined $len)
570 0 0 if $! == 32
571 0 0 if $! == 104
572 0 0 if $! == 4
586 145 4 if defined $len or $! != 4
606 20 43 if ($self->{'client'}{'harakiri'})