Branch Coverage

blib/lib/Plack/Middleware/LimitRequest.pm
Criterion Covered Total %
branch 27 30 90.0


line true false branch
14 3 1 unless defined $self->body
15 3 1 unless defined $self->fields
16 3 1 unless defined $self->field_size
17 3 1 if not defined $self->line
24 3 7 if (my $body_limit = $self->body)
25 2 1 if (my $content_length = $$env{'CONTENT_LENGTH'})
26 1 1 if ($content_length > $body_limit)
33 9 0 if (my $line_limit = $self->line)
37 18 9 if ($env_key ne 'SERVER_PROTOCOL')
40 1 26 if ($total > $line_limit)
50 8 0 if ($limit_fields or $limit_field_size)
53 150 24 unless $env_key =~ /^(?:HTTP_\w+|CONTENT_(?:TYPE|LENGTH))$/
55 1 23 if ($limit_fields and $field_count > $limit_fields)
58 23 0 if ($limit_field_size)
63 1 22 if ($field_size > $limit_field_size)