Condition Coverage

blib/lib/FCGI/Buffer.pm
Criterion Covered Total %
condition 81 272 29.7


and 2 conditions

line l !l condition
533 0 0 $self->{'o'} and scalar @{$self->{'o'};}

and 3 conditions

line !l l&&!r l&&r condition
128 17 1 20 $ENV{'SERVER_PROTOCOL'} and $ENV{'SERVER_PROTOCOL'} eq 'HTTP/1.1' || $ENV{'SERVER_PROTOCOL'} eq 'HTTP/2.0'
139 0 0 37 defined $^V and $^V ge "v5.14.0"
148 0 0 37 defined $self->{'buf'} and defined $self->{'buf'}->getpos
179 2 31 1 $ENV{'REQUEST_METHOD'} and $ENV{'REQUEST_METHOD'} eq "HEAD"
189 0 32 2 defined $self->{'body'} and $self->{'body'} eq ""
199 0 0 29 defined $content_type[0] and lc $content_type[0] eq "text"
0 0 29 defined $content_type[0] and lc $content_type[0] eq "text" and lc($content_type[1]) =~ /^html/
0 0 29 defined $content_type[0] and lc $content_type[0] eq "text" and lc($content_type[1]) =~ /^html/ and defined $self->{'body'}
318 0 33 1 defined $headers and $headers =~ /^Status: (\d+)/m
333 14 1 19 $ENV{'SERVER_PROTOCOL'} and $ENV{'SERVER_PROTOCOL'} eq 'HTTP/1.1' || $ENV{'SERVER_PROTOCOL'} eq 'HTTP/2.0'
1 8 11 $ENV{'SERVER_PROTOCOL'} and $ENV{'SERVER_PROTOCOL'} eq 'HTTP/1.1' || $ENV{'SERVER_PROTOCOL'} eq 'HTTP/2.0' and $self->{'generate_etag'}
8 0 11 $ENV{'SERVER_PROTOCOL'} and $ENV{'SERVER_PROTOCOL'} eq 'HTTP/1.1' || $ENV{'SERVER_PROTOCOL'} eq 'HTTP/2.0' and $self->{'generate_etag'} and defined $self->{'body'}
338 7 2 2 $ENV{'HTTP_IF_NONE_MATCH'} and $self->{'generate_304'}
2 0 2 $ENV{'HTTP_IF_NONE_MATCH'} and $self->{'generate_304'} and $self->{'status'} == 200
368 29 0 3 $range and not $self->{'cache'}
371 1 1 1 $1 and $2
415 0 0 0 $self->{'send_body'} and $ENV{'SERVER_PROTOCOL'}
0 0 0 $self->{'send_body'} and $ENV{'SERVER_PROTOCOL'} and $ENV{'SERVER_PROTOCOL'} eq 'HTTP/1.1' || $ENV{'SERVER_PROTOCOL'} eq 'HTTP/2.0'
0 0 0 $self->{'send_body'} and $ENV{'SERVER_PROTOCOL'} and $ENV{'SERVER_PROTOCOL'} eq 'HTTP/1.1' || $ENV{'SERVER_PROTOCOL'} eq 'HTTP/2.0' and $self->{'generate_304'}
0 0 0 $self->{'send_body'} and $ENV{'SERVER_PROTOCOL'} and $ENV{'SERVER_PROTOCOL'} eq 'HTTP/1.1' || $ENV{'SERVER_PROTOCOL'} eq 'HTTP/2.0' and $self->{'generate_304'} and $self->{'status'} == 200
425 0 0 0 $self->{'send_body'} and $self->{'status'} == 200
429 0 0 0 $changes and my $ttl = $self->{'save_to'}{'ttl'}
448 0 0 0 $sth->execute and my $href = $sth->fetchrow_hashref
472 0 0 0 $self->{'send_body'} and $ENV{'SERVER_PROTOCOL'}
0 0 0 $self->{'send_body'} and $ENV{'SERVER_PROTOCOL'} and $ENV{'SERVER_PROTOCOL'} eq 'HTTP/1.1' || $ENV{'SERVER_PROTOCOL'} eq 'HTTP/2.0'
0 0 0 $self->{'send_body'} and $ENV{'SERVER_PROTOCOL'} and $ENV{'SERVER_PROTOCOL'} eq 'HTTP/1.1' || $ENV{'SERVER_PROTOCOL'} eq 'HTTP/2.0' and $self->{'status'} == 200
475 0 0 0 $ENV{'HTTP_IF_NONE_MATCH'} and $self->{'generate_etag'}
485 0 0 0 $self->{'generate_etag'} and not defined $self->{'etag'}
0 0 0 defined $headers && $headers =~ /^ETag: /m
0 0 0 $self->{'generate_etag'} and not defined $self->{'etag'} and not defined $headers && $headers =~ /^ETag: /m
493 0 0 0 defined $headers and $headers =~ /^ETag: "([a-z0-9]{32})"/m
499 0 0 0 $ENV{'HTTP_IF_NONE_MATCH'} and $self->{'send_body'}
0 0 0 $ENV{'HTTP_IF_NONE_MATCH'} and $self->{'send_body'} and $self->{'status'} != 304
0 0 0 $ENV{'HTTP_IF_NONE_MATCH'} and $self->{'send_body'} and $self->{'status'} != 304 and $self->{'generate_304'}
505 0 0 0 $ENV{'HTTP_IF_MODIFIED_SINCE'} and $self->{'status'} != 304
0 0 0 $ENV{'HTTP_IF_MODIFIED_SINCE'} and $self->{'status'} != 304 and not $cannot_304
511 0 0 0 $self->{'status'} == 200 and $self->{'generate_last_modified'}
530 0 0 0 $changes and $encoding
533 0 0 0 defined $headers and length $headers
537 0 0 0 defined $headers and length $headers
572 0 0 0 $dbh and $self->{'info'}
0 0 0 $dbh and $self->{'info'} and $self->{'save_to'}
0 0 0 $dbh and $self->{'info'} and $self->{'save_to'} and my $request_uri = $ENV{'REQUEST_URI'}
639 0 0 0 $changes and my $ttl = $self->{'save_to'}{'ttl'}
687 23 0 3 $ENV{'HTTP_IF_MODIFIED_SINCE'} and $self->{'status'} != 304
23 0 3 $ENV{'HTTP_IF_MODIFIED_SINCE'} and $self->{'status'} != 304 and $self->{'generate_304'}
693 26 0 0 $self->_save_to($unzipped_body, $dbh) and $encoding
733 0 11 0 defined $headers && $headers =~ /^ETag: /m
23 0 11 $self->{'generate_etag'} and not defined $headers && $headers =~ /^ETag: /m
734 0 0 0 $self->{'logger'} and $self->{'status'} == 200 || $self->{'status'} == 304
0 0 0 $self->{'logger'} and $self->{'status'} == 200 || $self->{'status'} == 304 and $self->{'body'}
0 0 0 $self->{'logger'} and $self->{'status'} == 200 || $self->{'status'} == 304 and $self->{'body'} and not $ENV{'NO_CACHE'}
0 0 0 $self->{'logger'} and $self->{'status'} == 200 || $self->{'status'} == 304 and $self->{'body'} and not $ENV{'NO_CACHE'} and not $self->is_cached
768 0 0 34 defined $headers and length $headers
772 2 2 30 $self->{'body'} and $self->{'send_body'}
787 2 2 30 $body_length and $self->{'send_body'}
828 2 2 30 $self->{'send_body'} && defined $self->{'body'}
985 0 0 0 $headers and $headers =~ /^Vary: .*$/m
1119 31 0 1 defined $params{'save_to'} and $self->can_cache
31 0 0 exists $params{'save_to'} and not defined $params{'save_to'}
1143 27 0 4 defined $params{'info'} and not defined $self->{'info'}
1158 31 0 0 exists $params{'cache'} and $self->can_cache
1174 0 0 0 not defined $params{'cache'} and defined $self->{'cache'}
1381 1 31 2 $self->{'compress_content'} and $ENV{'HTTP_ACCEPT_ENCODING'} || $ENV{'HTTP_TE'}
1479 0 0 0 $self->{'cache'} and $self->{'logger'}
0 0 0 $self->{'cache'} and $self->{'logger'} and $self->{'logger'}->is_debug
1482 0 0 0 $cached_copy and $self->{'body'}
1500 26 0 0 $dbh and $self->{'info'}
0 0 0 $dbh and $self->{'info'} and my $request_uri = $ENV{'REQUEST_URI'}
1566 0 0 0 defined $creation and my $ttl = $self->{'save_to'}{'ttl'}
1569 0 0 0 $changes and $expiration == 0 || $expiration >= time
0 0 0 $expiration and $expiration < time

or 3 conditions

line l !l&&r !l&&!r condition
107 0 38 1 ref $proto || $proto
128 18 2 1 $ENV{'SERVER_PROTOCOL'} eq 'HTTP/1.1' || $ENV{'SERVER_PROTOCOL'} eq 'HTTP/2.0'
173 34 0 3 $headers or $self->is_cached
333 17 2 1 $ENV{'SERVER_PROTOCOL'} eq 'HTTP/1.1' || $ENV{'SERVER_PROTOCOL'} eq 'HTTP/2.0'
415 0 0 0 $ENV{'SERVER_PROTOCOL'} eq 'HTTP/1.1' || $ENV{'SERVER_PROTOCOL'} eq 'HTTP/2.0'
472 0 0 0 $ENV{'SERVER_PROTOCOL'} eq 'HTTP/1.1' || $ENV{'SERVER_PROTOCOL'} eq 'HTTP/2.0'
734 0 0 0 $self->{'status'} == 200 || $self->{'status'} == 304
1173 0 0 0 $self->{'cache_age'} ||= $params{'cache_age'}
1229 0 0 8 defined $ENV{'NO_CACHE'} or defined $ENV{'NO_STORE'}
1239 0 0 0 $control eq "no-store" or $control eq "no-cache"
0 0 0 $control eq "no-store" or $control eq "no-cache" or $control eq "max-age=0"
0 0 0 $control eq "no-store" or $control eq "no-cache" or $control eq "max-age=0" or $control eq "private"
1381 1 1 31 $ENV{'HTTP_ACCEPT_ENCODING'} || $ENV{'HTTP_TE'}
1390 1 0 1 $method eq "gzip" or $method eq "x-gzip"
1 1 0 $method eq "gzip" or $method eq "x-gzip" or $method eq "br"
1420 30 0 2 length $encoding == 0 or length $self->{'body'} < 32
1549 0 0 0 not defined $creation or $href->{'creation'} < $creation
1569 0 0 0 $expiration == 0 || $expiration >= time