Condition Coverage

blib/lib/HTTP/Lint.pm
Criterion Covered Total %
condition 57 86 66.2


and 3 conditions

line !l l&&!r l&&r condition
112 3 3 1 $request->method =~ /^(GET|HEAD|DELETE)$/ and $request->content
115 4 2 1 ($request->protocol || 'HTTP/1.0') eq 'HTTP/1.1' and not defined $request->header('Host')
137 6 1 0 defined $response->content_length and $response->content_length != length $response->content
140 3 1 3 ($response->protocol || 'HTTP/1.0') eq 'HTTP/1.1' and not $response->code == 204
4 0 3 ($response->protocol || 'HTTP/1.0') eq 'HTTP/1.1' and not $response->code == 204 and not $response->code == 304
1 1 2 ($response->protocol || 'HTTP/1.0') eq 'HTTP/1.1' and not $response->code == 204 and not $response->code == 304 and not defined $response->content_length
1 0 2 ($response->protocol || 'HTTP/1.0') eq 'HTTP/1.1' and not $response->code == 204 and not $response->code == 304 and not defined $response->content_length and ($response->header('Transfer-Encoding') || '') ne 'chunked'
146 3 3 1 $response->content and not defined $response->header('Content-Type')
149 3 4 0 $response->content and $response->code =~ /^[23]04$/
152 6 0 1 $response->code =~ /^(201|3\d\d)$/ and not defined $response->header('Location')
155 6 0 1 $response->code == 401 and not defined $response->header('WWW-Authenticate')
158 7 0 0 $response->code == 407 and not defined $response->header('Proxy-Authenticate')
161 6 0 1 $response->code == 503 and not defined $response->header('Retry-After')
166 5 0 2 $response->code == 405 and not defined $response->header('Allow')
169 7 0 0 $response->code eq 206 and not $response->header('Content-Range')
7 0 0 $response->code eq 206 and not $response->header('Content-Range') and !($response->header('Content-Type') || '') eq 'multipart/byteranges'
173 4 0 3 $response->code =~ /^2\d\d$/ and not $response->header('Date')
194 3 3 1 ($request->protocol || 'HTTP/1.0') eq 'HTTP/1.0' and ($response->protocol || 'HTTP/1.0') eq 'HTTP/1.1'
197 5 1 1 $request->method =~ /^(GET|HEAD|TRACE|OPTIONS)$/ and $response->code == 201
200 6 0 1 $request->method eq 'HEAD' and $response->content
203 7 0 0 $request->method eq 'TRACE' and ($response->header('Content-Type') || '') ne 'message/http'
206 7 0 0 $response->code eq 206 and not defined $request->header('Range')
209 7 0 0 $response->code eq 411 and $request->header('Content-Length')
212 7 0 0 $response->code eq 416 and not $request->header('Range')

or 2 conditions

line l !l condition
115 4 3 $request->protocol || 'HTTP/1.0'
140 6 1 $response->protocol || 'HTTP/1.0'
0 2 $response->header('Transfer-Encoding') || ''
169 0 0 $response->header('Content-Type') || ''
194 4 3 $request->protocol || 'HTTP/1.0'
3 1 $response->protocol || 'HTTP/1.0'
203 0 0 $response->header('Content-Type') || ''