Condition Coverage

blib/lib/Net/Inspect/L7/HTTP.pm
Criterion Covered Total %
condition 75 238 31.5


and 3 conditions

line !l l&&!r l&&r condition
222 2 5 0 $rqs->[0]{'state'} & 2 and not $self->{'upgrade'}
225 0 7 0 $self->{'gap_upto'}[0] >= 0 and $self->{'gap_upto'}[0] < $self->{'offset'}[0] + $len
261 16 59 0 @$rqs and $rqs->[0]{'state'} & 4
267 44 31 0 !@$rqs || $rqs->[0]{'state'} & 2 and $data =~ /\A[\r\n]+/g
285 0 0 0 @$rqs and not $rqs->[0]{'state'} & 2
355 16 1 0 $err and my $sub = $obj->can('fix_reqhdr')
378 16 0 0 %Net::Inspect::L7::HTTP::TRACE and $hdr{'junk'}
419 16 0 27 $data ne '' and not $rq->{'state'} & 2
557 0 2 0 $self->{'gap_upto'}[1] >= 0 and $self->{'gap_upto'}[1] < $self->{'offset'}[1] + $len
582 37 3 20 $data eq '' and not $eof
595 0 0 2 @$rqs and $rqs->[-1]{'state'} & 16
606 0 0 0 $data eq '' and $self->{'lastreqid'} > 1
666 13 1 0 $err and my $sub = $obj->can('fix_rsphdr')
674 13 0 0 %Net::Inspect::L7::HTTP::TRACE and $hdr{'junk'}
989 5 12 0 $version >= 1.1 and $kv{'expect'}
998 5 8 4 $version >= 1.1 and grep {/(?:^|[ \t,])chunked(?:$|[ \t,;])/i;} @{[] unless $kv{'transfer-encoding'};}
1006 5 0 0 @$cl > 1 and do { my %x; @x{@$cl} = (); keys %x } > 1
1029 5 11 0 $version >= 1.1 and $kv{'upgrade'}
10 0 1 $version >= 1.1 and $kv{'upgrade'} and my(%upgrade) = map({lc $_, 1;} map({/($token)/g;} @{$kv{'upgrade'};}))
1071 1 1 0 $code == 100 and $request->{'expect'}{'100-continue'}
1084 0 0 1 $request->{'upgrade'} and grep {/\bUPGRADE\b/i;} @{[] unless $kv{'connection'};}
1101 13 0 1 $request->{'method'} eq 'CONNECT' and $code >= 200
13 0 1 $request->{'method'} eq 'CONNECT' and $code >= 200 and $code < 300
1110 4 7 2 $version >= 1.1 and grep {/(?:^|[ \t,])chunked(?:$|[ \t,;])/i;} @{[] unless $kv{'transfer-encoding'};}
1118 5 0 0 @$cl > 1 and do { my %x; @x{@$cl} = (); keys %x } > 1

or 2 conditions

line l !l condition
87 0 0 $self->{'replay'} ||= []
141 0 14 $obj->{'hdr_maxsz'}[0] ||= 65536
142 0 14 $obj->{'hdr_maxsz'}[1] ||= 16384
143 0 14 $obj->{'hdr_maxsz'}[2] ||= 2048
151 0 0 $eof // 0
725 1 0 $obj->can('in_data') && do { &weaken(my $wobj = $obj); sub { $wobj->in_data(@_); } } || sub { }
951 18 0 pos $hdr // 0
1025 0 0 $hdr->{'content_length'} ||= 0

or 3 conditions

line l !l&&r !l&&!r condition
90 0 0 0 $buf =~ /[^\n]\r?\n\r?\n/ or length $buf > 65536
222 0 0 7 not @$rqs or $rqs->[0]{'state'} & 2 and not $self->{'upgrade'}
229 0 0 2 $rqs->[0]{'rqclen'} or $rqs->[0]{'rqchunked'}
241 0 0 2 $eof || ($rqs->[0]{'state'} & 2 ? 1 : 0)
267 16 15 44 !@$rqs || $rqs->[0]{'state'} & 2
287 0 0 0 $rqs->[0]{'obj'} || $self
288 0 0 0 $rqs->[0]{'obj'} || $self
298 16 1 30 not @$rqs or $rqs->[0]{'state'} & 2
341 0 0 0 $obj || $self
361 1 0 0 $obj || $self
378 0 0 0 $obj || $self
386 1 0 8 $hdr{'method'} eq 'CONNECT' or $hdr{'upgrade'}
398 0 0 0 $obj || $self
404 0 0 0 $obj || $self
408 0 0 0 $obj || $self
461 0 0 0 $obj || $self
473 0 0 6 $data =~ /\n/ or length $data > 8192
491 0 0 0 $obj || $self
503 0 0 0 $data =~ /\n\r?\n/ or length $data > $self->{'hdr_maxsz'}[2]
515 0 0 0 $obj || $self
520 0 0 0 $obj || $self
563 0 0 2 $rq->{'rpclen'} or not defined $rq->{'rpclen'}
0 0 2 $rq->{'rpclen'} or not defined $rq->{'rpclen'} or $rq->{'rpchunked'}
612 0 0 0 $rq->{'obj'} || $self
614 0 0 0 $rq->{'obj'} || $self
617 0 0 0 $rq->{'obj'} || $self
619 0 0 0 $rq->{'obj'} || $self
624 0 0 0 $rq->{'obj'} || $self
625 0 0 0 $rq->{'obj'} || $self
654 0 0 0 $obj || $self
674 0 0 0 $obj || $self
768 1 0 0 $obj || $self
772 0 0 0 $obj || $self
778 0 0 0 $obj || $self
783 0 0 0 $obj || $self
787 0 0 0 $obj || $self
863 0 0 0 $obj || $self
875 0 0 4 $data =~ /\n/ or length $data > 8192
892 0 0 0 $obj || $self
904 0 0 0 $data =~ /\n\r?\n/ or length $data > $self->{'hdr_maxsz'}[2]
916 0 0 0 $obj || $self
949 18 0 18 pos $hdr // 0 != length $hdr
1015 0 0 8 $hdr->{'content_length'} or $hdr->{'chunked'}
1021 4 0 4 $hdr->{'chunked'} or defined $hdr->{'content_length'}
4 0 0 $hdr->{'chunked'} or defined $hdr->{'content_length'} or $external_length
1071 1 0 1 $code == 100 and $request->{'expect'}{'100-continue'} or $code == 102
1 1 0 $code == 100 and $request->{'expect'}{'100-continue'} or $code == 102 or $code == 101
1124 4 0 8 $CODE_WITHOUT_RPBODY{$code} or $METHODS_WITHOUT_RPBODY{$request->{'method'}}
1173 0 0 0 $Net::Inspect::L7::HTTP::DEBUG or defined wantarray