Branch Coverage

blib/lib/PAGI/Middleware/GZip.pm
Criterion Covered Total %
branch 24 34 70.5


line true false branch
60 0 13 if ($scope->{'type'} ne "http")
69 2 11 unless ($accepts_gzip)
86 11 14 if ($event->{'type'} eq 'http.response.start') { }
14 0 elsif ($event->{'type'} eq 'http.response.body') { }
90 11 0 if (lc $h->[0] eq "content-type")
100 3 11 if ($headers_sent)
108 2 9 if ($event->{'more'})
109 2 0 unless ($headers_sent)
128 2 9 if $headers_sent
136 8 1 if ($should_compress and length $body > 0) { }
138 0 8 unless gzip(\$body, \$compressed)
143 0 8 if lc $h->[0] eq "content-length"
179 1 8 if $size < $self->{'min_size'}
185 8 7 if $content_type eq lc $type
186 0 7 if ($type =~ /\*$/)
188 0 0 if index($content_type, lc $prefix) == 0
199 11 0 if lc $h->[0] eq $name