Branch Coverage

lib/PAGI/Middleware/ContentLength.pm
Criterion Covered Total %
branch 19 22 86.3


line true false branch
55 1 6 if ($scope->{'type'} ne "http")
71 6 7 if ($type eq 'http.response.start') { }
7 0 elsif ($type eq 'http.response.body') { }
77 1 5 if (lc $h->[0] eq "content-length")
82 0 5 if (lc $h->[0] eq "transfer-encoding" and lc $h->[1] eq "chunked")
89 1 4 if ($has_content_length or $is_streaming or $self->{'auto_chunked'})
99 2 4 if ($has_content_length or $is_streaming or $self->{'auto_chunked'})
105 1 3 if ($event->{'more'})
130 3 0 if (@buffered_events and not $has_content_length and not $is_streaming)
134 3 3 if ($event->{'type'} eq "http.response.body")
141 3 3 if ($event->{'type'} eq "http.response.start")