Condition Coverage

blib/lib/CGI/Buffer.pm
Criterion Covered Total %
condition 4 216 1.8


and 3 conditions

line !l l&&!r l&&r condition
108 0 0 6 defined $^V and $^V ge "v5.14.0"
141 0 0 0 $ENV{'REQUEST_METHOD'} and $ENV{'REQUEST_METHOD'} eq "HEAD"
151 0 0 0 defined $body and $body eq ""
0 0 0 defined $content_type[0] and lc $content_type[0] eq "text"
0 0 0 defined $content_type[0] and lc $content_type[0] eq "text" and lc($content_type[1]) =~ /^html/u
0 0 0 defined $content_type[0] and lc $content_type[0] eq "text" and lc($content_type[1]) =~ /^html/u and defined $body
272 0 0 0 defined $headers and $headers =~ /^Status: (\d+)/mu
287 0 0 0 $ENV{'SERVER_PROTOCOL'} and $ENV{'SERVER_PROTOCOL'} eq 'HTTP/1.1' || $ENV{'SERVER_PROTOCOL'} eq 'HTTP/2.0'
0 0 0 $ENV{'SERVER_PROTOCOL'} and $ENV{'SERVER_PROTOCOL'} eq 'HTTP/1.1' || $ENV{'SERVER_PROTOCOL'} eq 'HTTP/2.0' and $generate_etag
0 0 0 $ENV{'SERVER_PROTOCOL'} and $ENV{'SERVER_PROTOCOL'} eq 'HTTP/1.1' || $ENV{'SERVER_PROTOCOL'} eq 'HTTP/2.0' and $generate_etag and defined $body
294 0 0 0 $ENV{'HTTP_IF_NONE_MATCH'} and $generate_304
0 0 0 $ENV{'HTTP_IF_NONE_MATCH'} and $generate_304 and $status == 200
317 0 0 0 $range and not $cache
320 0 0 0 $1 and $2
366 0 0 0 $send_body and $ENV{'SERVER_PROTOCOL'}
0 0 0 $send_body and $ENV{'SERVER_PROTOCOL'} and $ENV{'SERVER_PROTOCOL'} eq 'HTTP/1.1' || $ENV{'SERVER_PROTOCOL'} eq 'HTTP/2.0'
0 0 0 $send_body and $ENV{'SERVER_PROTOCOL'} and $ENV{'SERVER_PROTOCOL'} eq 'HTTP/1.1' || $ENV{'SERVER_PROTOCOL'} eq 'HTTP/2.0' and $generate_304
0 0 0 $send_body and $ENV{'SERVER_PROTOCOL'} and $ENV{'SERVER_PROTOCOL'} eq 'HTTP/1.1' || $ENV{'SERVER_PROTOCOL'} eq 'HTTP/2.0' and $generate_304 and $status == 200
376 0 0 0 $send_body and $status == 200
0 0 0 $send_body and $status == 200 and defined $cache_hash
398 0 0 0 $send_body and $ENV{'SERVER_PROTOCOL'}
0 0 0 $send_body and $ENV{'SERVER_PROTOCOL'} and $ENV{'SERVER_PROTOCOL'} eq 'HTTP/1.1' || $ENV{'SERVER_PROTOCOL'} eq 'HTTP/2.0'
0 0 0 $send_body and $ENV{'SERVER_PROTOCOL'} and $ENV{'SERVER_PROTOCOL'} eq 'HTTP/1.1' || $ENV{'SERVER_PROTOCOL'} eq 'HTTP/2.0' and $status == 200
409 0 0 0 $logger and $generate_304
412 0 0 0 $ENV{'HTTP_IF_NONE_MATCH'} eq $etag and $generate_304
425 0 0 0 $generate_etag and not defined $etag
0 0 0 defined $headers && $headers =~ /^ETag: /mu
0 0 0 $generate_etag and not defined $etag and not defined $headers && $headers =~ /^ETag: /mu
433 0 0 0 defined $headers and $headers =~ /^ETag: "([a-z0-9]{32})"/mu
439 0 0 0 $ENV{'HTTP_IF_NONE_MATCH'} and $send_body
0 0 0 $ENV{'HTTP_IF_NONE_MATCH'} and $send_body and $status != 304
0 0 0 $ENV{'HTTP_IF_NONE_MATCH'} and $send_body and $status != 304 and $generate_304
443 0 0 0 defined $etag and $etag eq $ENV{'HTTP_IF_NONE_MATCH'}
0 0 0 defined $etag and $etag eq $ENV{'HTTP_IF_NONE_MATCH'} and $status == 200
455 0 0 0 $ENV{'HTTP_IF_MODIFIED_SINCE'} and $status != 304
0 0 0 $ENV{'HTTP_IF_MODIFIED_SINCE'} and $status != 304 and not $cannot_304
461 0 0 0 $status == 200 and $generate_last_modified
478 0 0 0 @o and defined $o[0]
0 0 0 defined $headers and length $headers
482 0 0 0 defined $headers and length $headers
501 0 0 0 $generate_etag and defined $etag
549 0 0 0 $ENV{'HTTP_IF_MODIFIED_SINCE'} and $status != 304
0 0 0 $ENV{'HTTP_IF_MODIFIED_SINCE'} and $status != 304 and $generate_304
558 0 0 0 defined $headers && $headers =~ /^ETag: /mu
0 0 0 $generate_etag and not defined $headers && $headers =~ /^ETag: /mu
559 0 0 0 $logger and $status == 200 || $status == 304
0 0 0 $logger and $status == 200 || $status == 304 and $body
0 0 0 $logger and $status == 200 || $status == 304 and $body and not is_cached()
579 0 0 0 defined $headers and length $headers
583 0 0 0 $body and $send_body
598 0 0 0 $body_length and $send_body
638 0 0 0 $send_body && defined $body
767 0 0 0 $headers and $headers =~ /^Vary: .*$/mu
876 0 0 0 defined $params{'info'} and not defined $info
891 0 0 0 defined $params{'cache'} and can_cache()
908 0 0 0 not defined $params{'cache'} and defined $cache
1100 0 0 0 $compress_content and $ENV{'HTTP_ACCEPT_ENCODING'} || $ENV{'HTTP_TE'}

or 3 conditions

line l !l&&r !l&&!r condition
101 6 0 0 not defined $ENV{'SERVER_PROTOCOL'} or $ENV{'SERVER_PROTOCOL'} eq "HTTP/1.0"
135 0 0 6 $headers or is_cached()
287 0 0 0 $ENV{'SERVER_PROTOCOL'} eq 'HTTP/1.1' || $ENV{'SERVER_PROTOCOL'} eq 'HTTP/2.0'
366 0 0 0 $ENV{'SERVER_PROTOCOL'} eq 'HTTP/1.1' || $ENV{'SERVER_PROTOCOL'} eq 'HTTP/2.0'
398 0 0 0 $ENV{'SERVER_PROTOCOL'} eq 'HTTP/1.1' || $ENV{'SERVER_PROTOCOL'} eq 'HTTP/2.0'
559 0 0 0 $status == 200 || $status == 304
906 0 0 0 $cache_age ||= $params{'cache_age'}
958 0 0 3 defined $ENV{'NO_CACHE'} or defined $ENV{'NO_STORE'}
968 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"
1100 0 0 0 $ENV{'HTTP_ACCEPT_ENCODING'} || $ENV{'HTTP_TE'}
1108 0 0 0 $method eq "gzip" or $method eq "x-gzip"
0 0 0 $method eq "gzip" or $method eq "x-gzip" or $method eq "br"
1135 0 0 0 length $encoding == 0 or length $body < 32