Condition Coverage

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


and 2 conditions

line l !l condition
540 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'}
322 0 33 1 defined $headers and $headers =~ /^Status: (\d+)/m
337 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'}
342 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
372 29 0 3 $range and not $self->{'cache'}
375 1 1 1 $1 and $2
421 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
431 0 0 0 $self->{'send_body'} and $self->{'status'} == 200
0 0 0 $self->{'send_body'} and $self->{'status'} == 200 and defined $cache_hash
435 0 0 0 $changes and my $ttl = $self->{'save_to'}{'ttl'}
454 0 0 0 $sth->execute and my $href = $sth->fetchrow_hashref
479 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
482 0 0 0 $ENV{'HTTP_IF_NONE_MATCH'} and $self->{'generate_etag'}
492 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
500 0 0 0 defined $headers and $headers =~ /^ETag: "([a-z0-9]{32})"/m
506 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'}
512 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
518 0 0 0 $self->{'status'} == 200 and $self->{'generate_last_modified'}
537 0 0 0 $changes and $encoding
540 0 0 0 defined $headers and length $headers
544 0 0 0 defined $headers and length $headers
579 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'}
646 0 0 0 $changes and my $ttl = $self->{'save_to'}{'ttl'}
694 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'}
700 26 0 0 $self->_save_to($unzipped_body, $dbh) and $encoding
740 0 11 0 defined $headers && $headers =~ /^ETag: /m
23 0 11 $self->{'generate_etag'} and not defined $headers && $headers =~ /^ETag: /m
741 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
775 0 0 34 defined $headers and length $headers
779 2 2 30 $self->{'body'} and $self->{'send_body'}
794 2 2 30 $body_length and $self->{'send_body'}
835 2 2 30 $self->{'send_body'} && defined $self->{'body'}
993 0 0 0 $headers and $headers =~ /^Vary: .*$/m
1127 31 0 1 defined $params{'save_to'} and $self->can_cache
31 0 0 exists $params{'save_to'} and not defined $params{'save_to'}
1151 27 0 4 defined $params{'info'} and not defined $self->{'info'}
1166 31 0 0 exists $params{'cache'} and $self->can_cache
1182 0 0 0 not defined $params{'cache'} and defined $self->{'cache'}
1389 1 31 2 $self->{'compress_content'} and $ENV{'HTTP_ACCEPT_ENCODING'} || $ENV{'HTTP_TE'}
1487 0 0 0 $self->{'cache'} and $self->{'logger'}
0 0 0 $self->{'cache'} and $self->{'logger'} and $self->{'logger'}->is_debug
1490 0 0 0 $cached_copy and $self->{'body'}
1508 26 0 0 $dbh and $self->{'info'}
0 0 0 $dbh and $self->{'info'} and my $request_uri = $ENV{'REQUEST_URI'}
1574 0 0 0 defined $creation and my $ttl = $self->{'save_to'}{'ttl'}
1577 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
337 17 2 1 $ENV{'SERVER_PROTOCOL'} eq 'HTTP/1.1' || $ENV{'SERVER_PROTOCOL'} eq 'HTTP/2.0'
421 0 0 0 $ENV{'SERVER_PROTOCOL'} eq 'HTTP/1.1' || $ENV{'SERVER_PROTOCOL'} eq 'HTTP/2.0'
479 0 0 0 $ENV{'SERVER_PROTOCOL'} eq 'HTTP/1.1' || $ENV{'SERVER_PROTOCOL'} eq 'HTTP/2.0'
741 0 0 0 $self->{'status'} == 200 || $self->{'status'} == 304
1181 0 0 0 $self->{'cache_age'} ||= $params{'cache_age'}
1237 0 0 8 defined $ENV{'NO_CACHE'} or defined $ENV{'NO_STORE'}
1247 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"
1389 1 1 31 $ENV{'HTTP_ACCEPT_ENCODING'} || $ENV{'HTTP_TE'}
1398 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"
1428 30 0 2 length $encoding == 0 or length $self->{'body'} < 32
1557 0 0 0 not defined $creation or $href->{'creation'} < $creation
1577 0 0 0 $expiration == 0 || $expiration >= time