Condition Coverage

blib/lib/FCGI/Buffer.pm
Criterion Covered Total %
condition 81 275 29.4


and 2 conditions

line l !l condition
551 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
190 2 31 1 $ENV{'REQUEST_METHOD'} and $ENV{'REQUEST_METHOD'} eq "HEAD"
200 0 32 2 defined $self->{'body'} and $self->{'body'} eq ""
210 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'}
333 0 33 1 defined $headers and $headers =~ /^Status: (\d+)/m
348 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'}
353 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
383 29 0 3 $range and not $self->{'cache'}
386 1 1 1 $1 and $2
432 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
442 0 0 0 $self->{'send_body'} and $self->{'status'} == 200
0 0 0 $self->{'send_body'} and $self->{'status'} == 200 and defined $cache_hash
446 0 0 0 $changes and my $ttl = $self->{'save_to'}{'ttl'}
465 0 0 0 $sth->execute and my $href = $sth->fetchrow_hashref
490 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
493 0 0 0 $ENV{'HTTP_IF_NONE_MATCH'} and $self->{'generate_etag'}
503 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
511 0 0 0 defined $headers and $headers =~ /^ETag: "([a-z0-9]{32})"/m
517 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'}
523 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
529 0 0 0 $self->{'status'} == 200 and $self->{'generate_last_modified'}
548 0 0 0 $changes and $encoding
551 0 0 0 defined $headers and length $headers
555 0 0 0 defined $headers and length $headers
590 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'}
657 0 0 0 $changes and my $ttl = $self->{'save_to'}{'ttl'}
705 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'}
711 26 0 0 $self->_save_to($unzipped_body, $dbh) and $encoding
751 0 11 0 defined $headers && $headers =~ /^ETag: /m
23 0 11 $self->{'generate_etag'} and not defined $headers && $headers =~ /^ETag: /m
752 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
786 0 0 34 defined $headers and length $headers
790 2 2 30 $self->{'body'} and $self->{'send_body'}
805 2 2 30 $body_length and $self->{'send_body'}
846 2 2 30 $self->{'send_body'} && defined $self->{'body'}
1004 0 0 0 $headers and $headers =~ /^Vary: .*$/m
1138 31 0 1 defined $params{'save_to'} and $self->can_cache
31 0 0 exists $params{'save_to'} and not defined $params{'save_to'}
1162 27 0 4 defined $params{'info'} and not defined $self->{'info'}
1177 31 0 0 exists $params{'cache'} and $self->can_cache
1193 0 0 0 not defined $params{'cache'} and defined $self->{'cache'}
1400 1 31 2 $self->{'compress_content'} and $ENV{'HTTP_ACCEPT_ENCODING'} || $ENV{'HTTP_TE'}
1499 0 0 0 $self->{'cache'} and $self->{'logger'}
0 0 0 $self->{'cache'} and $self->{'logger'} and $self->{'logger'}->is_debug
1502 0 0 0 $cached_copy and $self->{'body'}
1520 26 0 0 $dbh and $self->{'info'}
0 0 0 $dbh and $self->{'info'} and my $request_uri = $ENV{'REQUEST_URI'}
1586 0 0 0 defined $creation and my $ttl = $self->{'save_to'}{'ttl'}
1589 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
348 17 2 1 $ENV{'SERVER_PROTOCOL'} eq 'HTTP/1.1' || $ENV{'SERVER_PROTOCOL'} eq 'HTTP/2.0'
432 0 0 0 $ENV{'SERVER_PROTOCOL'} eq 'HTTP/1.1' || $ENV{'SERVER_PROTOCOL'} eq 'HTTP/2.0'
490 0 0 0 $ENV{'SERVER_PROTOCOL'} eq 'HTTP/1.1' || $ENV{'SERVER_PROTOCOL'} eq 'HTTP/2.0'
752 0 0 0 $self->{'status'} == 200 || $self->{'status'} == 304
1192 0 0 0 $self->{'cache_age'} ||= $params{'cache_age'}
1248 0 0 8 defined $ENV{'NO_CACHE'} or defined $ENV{'NO_STORE'}
1258 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"
1400 1 1 31 $ENV{'HTTP_ACCEPT_ENCODING'} || $ENV{'HTTP_TE'}
1409 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"
1440 30 0 2 length $encoding == 0 or length $self->{'body'} < 32
1569 0 0 0 not defined $creation or $href->{'creation'} < $creation
1589 0 0 0 $expiration == 0 || $expiration >= time