Branch Coverage

blib/lib/Starman/Server.pm
Criterion Covered Total %
branch 92 158 58.2


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