Branch Coverage

blib/lib/Plack/App/GitSmartHttp.pm
Criterion Covered Total %
branch 47 60 78.3


line true false branch
41 16 4 unless ($self->git_path)
43 0 16 unless ($git_path)
48 0 20 unless (-x $self->git_path)
60 1 19 unless $cmd
61 2 17 if $cmd eq 'not_allowed'
64 1 16 unless $dir
84 1 6 unless $service
85 2 4 unless substr($service, 0, 4) eq 'git-'
97 29 95 if ($req->path_info =~ /$match/)
98 3 26 if $$s[0] ne uc $req->method
117 18 2 if -d $path
128 4 4 unless $self->has_access($req, $rpc, 1)
134 2 2 if (exists $req->env->{'HTTP_CONTENT_ENCODING'} and $req->env->{'HTTP_CONTENT_ENCODING'} =~ /^(?:x-)?gzip$/)
138 0 2 unless ($input)
151 1 3 if ($input_len == 0)
175 0 11 if ($handle == $cerr) { }
182 6 0 if eof $handle
189 0 3 if ($err)
202 2 1 if ($self->has_access($$args{'req'}, $service)) { }
215 0 3 if ($handle == $cerr) { }
222 4 0 if eof $handle
229 0 2 if ($err)
304 4 7 if ($check_content_type and $req->content_type ne sprintf('application/x-git-%s-request', $rpc))
311 1 6 unless $rpc
312 1 5 if $rpc eq 'receive-pack'
313 5 0 if $rpc eq 'upload-pack'
322 0 6 unless -e $file
336 6 0 if ($stat[7])
339 0 6 unless open my $fh, '<:raw', $file
359 1 1 if ($$env{'SERVER_PROTOCOL'} eq 'HTTP/1.1') { }