Branch Coverage

blib/lib/FusionInventory/Agent/HTTP/Server.pm
Criterion Covered Total %
branch 13 44 29.5


line true false branch
35 0 0 unless $target->isa('FusionInventory::Agent::Target::Server')
41 6 7 if ($params{'trust'})
44 12 3 if @addresses
56 0 6 unless ($request)
66 0 6 if ($method ne 'GET') { }
73 6 0 if ($path eq '/')
79 0 0 if ($path =~ m[^/deploy/getFile/./../([\w\d/-]+)$])
85 0 0 if ($path =~ m[^/now(?:/(\S*))?$])
91 0 0 if ($path eq '/status')
97 0 0 if ($path =~ m[^/(logo.png|site.css|favicon.ico)$])
123 0 6 unless ($template)
171 0 0 unless $sha512 =~ /^(.)(.)(.{6})/
179 0 0 unless -f $_ . '/' . $subFilePath
183 0 0 unless $sha->hexdigest eq $sha512
189 0 0 if ($path) { }
207 0 0 unless $target->isa('FusionInventory::Agent::Target::Server')
210 0 0 unless isPartOf($clientIp, $addresses, $logger)
218 0 0 if ($self->_isTrusted($clientIp))
276 9 9 if isPartOf($address, $trusted_addresses, $self->{'logger'})
294 0 7 unless ($self->{'listener'})
307 0 6 unless $self->{'listener'}
310 0 6 unless $socket