Branch Coverage

blib/lib/PAGI/Server/Protocol/HTTP2.pm
Criterion Covered Total %
branch 39 56 69.6


line true false branch
43 87 0 eval { do { require Net::HTTP2::nghttp2; 'Net::HTTP2::nghttp2'->VERSION('0.007'); require Net::HTTP2::nghttp2::Session; 'Net::HTTP2::nghttp2'->available } } ? :
64 3 39 unless defined $bytes and length $bytes >= 24
114 0 77 unless $AVAILABLE
171 0 76 unless $weak_self
174 76 0 if (not defined $type or $type == Net::HTTP2::nghttp2::NGHTTP2_HEADERS())
186 0 353 unless $weak_self
189 0 353 unless $stream
193 1 352 if ($stream->{'header_list_size'} > $weak_self->{'settings'}{'max_header_list_size'})
199 316 36 if ($name =~ /^:/) { }
209 0 254 unless $weak_self
216 75 179 if ($type == Net::HTTP2::nghttp2::NGHTTP2_HEADERS())
220 0 75 if ($stream and $stream->{'client_end_stream'})
224 75 0 if ($stream and $weak_self->{'on_request'})
230 75 0 if (defined $pseudo->{':authority'})
234 1 35 if ($h->[0] eq "host")
240 74 1 unless $found_host
248 2 108 if ($h->[0] eq 'cookie') { }
254 1 74 if (@cookie_values > 1)
262 54 21 if ($end_stream)
276 19 235 if ($type == Net::HTTP2::nghttp2::NGHTTP2_DATA())
278 7 12 if ($end_stream)
280 7 0 if $stream
281 7 0 if ($weak_self->{'on_body'})
292 0 23 unless $weak_self
296 0 23 if ($stream and $stream->{'client_end_stream'})
300 23 0 if ($weak_self->{'on_body'})
309 0 45 unless $weak_self
311 45 0 if ($weak_self->{'on_close'})