Condition Coverage

blib/lib/FCGI/Buffer.pm
Criterion Covered Total %
condition 68 251 27.0


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
122 15 1 20 $ENV{'SERVER_PROTOCOL'} and $ENV{'SERVER_PROTOCOL'} eq 'HTTP/1.1'
133 0 0 36 defined $^V and $^V ge 'v5.14.0'
142 0 0 36 defined $self->{'buf'} and defined $self->{'buf'}->getpos
173 1 31 1 $ENV{'REQUEST_METHOD'} and $ENV{'REQUEST_METHOD'} eq 'HEAD'
183 0 31 2 defined $self->{'body'} and $self->{'body'} eq ''
193 0 0 28 defined $content_type[0] and lc $content_type[0] eq 'text'
0 0 28 defined $content_type[0] and lc $content_type[0] eq 'text' and lc($content_type[1]) =~ /^html/
0 0 28 defined $content_type[0] and lc $content_type[0] eq 'text' and lc($content_type[1]) =~ /^html/ and defined $self->{'body'}
312 0 32 1 defined $headers and $headers =~ /^Status: (\d+)/m
327 13 1 19 $ENV{'SERVER_PROTOCOL'} and $ENV{'SERVER_PROTOCOL'} eq 'HTTP/1.1'
14 8 11 $ENV{'SERVER_PROTOCOL'} and $ENV{'SERVER_PROTOCOL'} eq 'HTTP/1.1' and $self->{'generate_etag'}
8 0 11 $ENV{'SERVER_PROTOCOL'} and $ENV{'SERVER_PROTOCOL'} eq 'HTTP/1.1' and $self->{'generate_etag'} and defined $self->{'body'}
334 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
364 28 0 3 $range and not $self->{'cache'}
367 1 1 1 $1 and $2
411 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'
0 0 0 $self->{'send_body'} and $ENV{'SERVER_PROTOCOL'} and $ENV{'SERVER_PROTOCOL'} eq 'HTTP/1.1' and $self->{'generate_304'}
0 0 0 $self->{'send_body'} and $ENV{'SERVER_PROTOCOL'} and $ENV{'SERVER_PROTOCOL'} eq 'HTTP/1.1' and $self->{'generate_304'} and $self->{'status'} == 200
421 0 0 0 $self->{'send_body'} and $self->{'status'} == 200
425 0 0 0 $changes and my $ttl = $self->{'save_to'}{'ttl'}
444 0 0 0 $sth->execute and my $href = $sth->fetchrow_hashref
468 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'
0 0 0 $self->{'send_body'} and $ENV{'SERVER_PROTOCOL'} and $ENV{'SERVER_PROTOCOL'} eq 'HTTP/1.1' and $self->{'status'} == 200
471 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
556 0 0 0 $self->{'generate_etag'} and defined $self->{'etag'}
569 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'}
634 0 0 0 $changes and my $ttl = $self->{'save_to'}{'ttl'}
677 26 0 0 $self->_save_to($unzipped_body, $dbh) and $encoding
684 0 11 0 defined $headers && $headers =~ /^ETag: /m
22 0 11 $self->{'generate_etag'} and not defined $headers && $headers =~ /^ETag: /m
685 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 $self->is_cached
712 0 0 33 defined $headers and length $headers
716 2 2 29 $self->{'body'} and $self->{'send_body'}
731 2 2 29 $body_length and $self->{'send_body'}
772 2 2 29 $self->{'send_body'} && defined $self->{'body'}
913 0 0 0 $headers and $headers =~ /^Vary: .*$/m
1047 31 0 0 defined $params{'save_to'} and $self->can_cache
31 0 0 exists $params{'save_to'} and not defined $params{'save_to'}
1068 27 0 4 defined $params{'info'} and not defined $self->{'info'}
1083 31 0 0 exists $params{'cache'} and $self->can_cache
1099 0 0 0 not defined $params{'cache'} and defined $self->{'cache'}
1302 1 30 2 $self->{'compress_content'} and $ENV{'HTTP_ACCEPT_ENCODING'} || $ENV{'HTTP_TE'}
1400 0 0 0 $self->{'cache'} and $self->{'logger'}
0 0 0 $self->{'cache'} and $self->{'logger'} and $self->{'logger'}->is_debug
1403 0 0 0 $cached_copy and $self->{'body'}
1421 26 0 0 $dbh and $self->{'info'}
0 0 0 $dbh and $self->{'info'} and my $request_uri = $ENV{'REQUEST_URI'}
1487 0 0 0 defined $creation and my $ttl = $self->{'save_to'}{'ttl'}
1490 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
167 33 0 3 $headers or $self->is_cached
685 0 0 0 $self->{'status'} == 200 || $self->{'status'} == 304
1098 0 0 0 $self->{'cache_age'} ||= $params{'cache_age'}
1154 0 0 6 defined $ENV{'NO_CACHE'} or defined $ENV{'NO_STORE'}
1164 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'
1302 1 1 30 $ENV{'HTTP_ACCEPT_ENCODING'} || $ENV{'HTTP_TE'}
1311 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'
1341 29 0 2 length $encoding == 0 or length $self->{'body'} < 32
1470 0 0 0 not defined $creation or $href->{'creation'} < $creation
1490 0 0 0 $expiration == 0 || $expiration >= time