Branch Coverage

blib/lib/PAGI/Server/Protocol/HTTP1.pm
Criterion Covered Total %
branch 76 84 90.4


line true false branch
22 2 497 if ($name =~ /[\r\n\0]/)
27 0 497 if ($name =~ /[[:cntrl:]]/)
36 14 483 if ($value =~ /[\r\n\0]/)
222 10 230 ref $buffer_ref ? :
226 3 237 if $header_end < 0
230 2 235 if ($first_line_end > $self->{'max_request_line_size'})
235 2 233 if ($header_end > $self->{'max_header_size'})
244 1 232 if ($ret == -1)
251 0 232 if $ret < 0
268 229 3 if (not $raw_path =~ /[%\x80-\xff]/) { }
287 678 1414 if (index($key, "HTTP_") == 0)
293 1 677 if ($header_name eq "cookie")
299 6 671 if ($header_name eq "transfer-encoding")
301 4 2 if (@codings and $codings[-1] eq 'chunked') { }
1 1 elsif (grep {$_ eq 'chunked';} @codings) { }
312 1 676 if ($header_name eq "expect" and lc $value eq "100-continue")
321 1 231 if (@cookie_values)
326 1 231 if (@headers > $self->{'max_header_count'})
331 6 225 if (defined $env{'CONTENT_TYPE'})
334 16 215 if (defined $env{'CONTENT_LENGTH'})
339 4 12 unless ($cl_value =~ /^\d+$/)
345 1 11 if (length $cl_value > 10 or $cl_value > 2147483647)
354 1 225 if ($te_bad_order)
357 1 224 if ($te_unsupported)
363 1 223 if ($chunked and defined $content_length)
369 223 0 if ($env{'SERVER_PROTOCOL'} and index($env{'SERVER_PROTOCOL'}, "HTTP/") == 0)
376 1 222 if ($http_version eq "1.1" and not defined $env{'HTTP_HOST'})
407 1 494 if lc $name eq "server"
414 209 1 unless ($has_server)
420 158 52 if ($chunked and $http_version eq "1.1")
432 0 1 unless defined $chunk and length $chunk
434 1 0 if ($chunked) { }
439 1 0 unless ($more)
479 118 133 if ($now != $_cached_date_time)
507 0 16 ref $buffer_ref ? :
515 0 25 if $crlf < 0
523 4 21 if ($size_line eq "" or not $size_line =~ /^[0-9a-fA-F]+$/)
529 1 20 if (length $size_line > 7)
536 2 18 if ($chunk_size > $self->{'max_chunk_size'})
544 1 17 if (length $buffer < $chunk_end)
549 9 8 if ($chunk_size > 0)
556 8 9 if ($chunk_size == 0)