Branch Coverage

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


line true false branch
47 113 0 eval { do { require Net::HTTP2::nghttp2; 'Net::HTTP2::nghttp2'->VERSION('0.008'); require Net::HTTP2::nghttp2::Session; 'Net::HTTP2::nghttp2'->available } } ? :
77 3 46 unless defined $bytes and length $bytes >= 24
129 0 89 unless $AVAILABLE
192 0 87 unless $weak_self
195 87 0 if (not defined $type or $type == Net::HTTP2::nghttp2::NGHTTP2_HEADERS())
207 0 411 unless $weak_self
210 0 411 unless $stream
214 1 410 if ($stream->{'header_list_size'} > $weak_self->{'settings'}{'max_header_list_size'})
220 363 47 if ($name =~ /^:/) { }
230 0 295 unless $weak_self
237 86 209 if ($type == Net::HTTP2::nghttp2::NGHTTP2_HEADERS())
241 0 86 if ($stream and $stream->{'client_end_stream'})
245 86 0 if ($stream and $weak_self->{'on_request'})
251 86 0 if (defined $pseudo->{':authority'})
255 1 46 if ($h->[0] eq "host")
261 85 1 unless $found_host
269 2 130 if ($h->[0] eq 'cookie') { }
275 1 85 if (@cookie_values > 1)
283 65 21 if ($end_stream)
297 16 279 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 51 unless $weak_self
332 51 0 if ($weak_self->{'on_close'})
343 89 0 defined $rl ? :