Branch Coverage

blib/lib/Mojo/Transaction/HTTP.pm
Criterion Covered Total %
branch 45 52 86.5


line true false branch
11 8 958 if uc $self->req->method eq "HEAD"
12 41 925 unless $res->parse($chunk)->is_finished
15 923 2 if not $res->is_info or $res->headers->upgrade
17 0 2 unless length(my $leftovers = $res->content->leftovers)
33 45 1772 if $req_conn eq "close" or $res_conn eq "close"
36 9 1763 if $res->version eq "1.0"
37 3 1760 if $req->version eq "1.0"
50 1072 0 if ++$_[0]{'writing'}
57 1042 0 unless $req->error
60 936 106 if $req->is_finished and not $self->{'handled'}++
70 2807 11 defined $buffer ? :
73 11 2807 unless defined $buffer
76 845 936 $finish ? :
1781 1037 if defined $buffer and not length $buffer
86 1868 0 defined $buffer ? :
91 1868 0 if ($self->{'write'} <= 0)
95 91 1777 if $head and $self->is_empty
106 1868 0 defined $buffer ? :
111 1868 0 if $self->{'write'} <= 0
120 1837 1989 $server ? :
916 2910 unless $server ? $self->{'writing'} : ($self->{'writing'} //= 1)
124 1790 1120 $server ? :
125 1868 1042 unless $self->{'http_state'}
129 1868 1042 if $self->{'http_state'} eq "start_line"
132 1868 1042 if $self->{'http_state'} eq "headers"
135 2818 92 if $self->{'http_state'} eq "body"