Branch Coverage

blib/lib/PAGI/Server/Protocol/HTTP2.pm
Criterion Covered Total %
branch 40 58 68.9


line true false branch
47 109 0 eval { do { require Net::HTTP2::nghttp2; 'Net::HTTP2::nghttp2'->VERSION('0.008'); require Net::HTTP2::nghttp2::Session; 'Net::HTTP2::nghttp2'->available } } ? :
77 3 45 unless defined $bytes and length $bytes >= 24
129 0 84 unless $AVAILABLE
192 0 82 unless $weak_self
195 82 0 if (not defined $type or $type == Net::HTTP2::nghttp2::NGHTTP2_HEADERS())
207 0 386 unless $weak_self
210 0 386 unless $stream
214 1 385 if ($stream->{'header_list_size'} > $weak_self->{'settings'}{'max_header_list_size'})
220 343 42 if ($name =~ /^:/) { }
230 0 280 unless $weak_self
237 81 199 if ($type == Net::HTTP2::nghttp2::NGHTTP2_HEADERS())
241 0 81 if ($stream and $stream->{'client_end_stream'})
245 81 0 if ($stream and $weak_self->{'on_request'})
251 81 0 if (defined $pseudo->{':authority'})
255 1 41 if ($h->[0] eq "host")
261 80 1 unless $found_host
269 2 120 if ($h->[0] eq 'cookie') { }
275 1 80 if (@cookie_values > 1)
283 60 21 if ($end_stream)
297 16 264 if ($type == Net::HTTP2::nghttp2::NGHTTP2_DATA())
299 4 12 if ($end_stream)
301 4 0 if $stream
302 4 0 if ($weak_self->{'on_body'})
313 0 20 unless $weak_self
317 0 20 if ($stream and $stream->{'client_end_stream'})
321 20 0 if ($weak_self->{'on_body'})
330 0 47 unless $weak_self
332 47 0 if ($weak_self->{'on_close'})
343 84 0 defined $rl ? :