Branch Coverage

feersum_utils.c.inc
Criterion Covered Total %
branch 54 78 69.2


line true false branch
133 104 12 for (size_t i = 0; i < len; i++)
134 4 100 if (ascii_lower[(unsigned char)a[i]] != ascii_lower[(unsigned char)b[i]]) return 0;
145 14477 1678 for (size_t i = 0; i < len; i++)
146 198 14279 if (a[i] != ascii_lower[(unsigned char)b[i]]) return 0;
160 17979 320 while (ptr < end) {
161 3 17976 if (unlikely(*ptr == '%')) goto needs_decode;
172 28 3 for (; ptr < end; ptr++) {
173 9 19 if (unlikely(*ptr == '%') && likely(end - ptr > 2)) {
8 1 if (unlikely(*ptr == '%') && likely(end - ptr > 2)) {
176 7 1 if (likely(c1 != -1 && c2 != -1)) {
7 0 if (likely(c1 != -1 && c2 != -1)) {
194 66 275 if (c->remote_addr) return; // already cached
200 271 0 if (inet_ntop(AF_INET, &in->sin_addr, buf, sizeof(buf))) {
212 4 0 if (inet_ntop(AF_INET6, &in6->sin6_addr, buf, sizeof(buf))) {
241 217 0 if (likely(memcmp(r->method, "GET", 3) == 0))
243 0 0 if (memcmp(r->method, "PUT", 3) == 0)
247 104 1 if (likely(memcmp(r->method, "POST", 4) == 0))
249 1 0 if (memcmp(r->method, "HEAD", 4) == 0)
253 1 0 if (memcmp(r->method, "PATCH", 5) == 0)
257 1 0 if (memcmp(r->method, "DELETE", 6) == 0)
261 1 0 if (memcmp(r->method, "OPTIONS", 7) == 0)
278 586 12 return (r->minor_version == 1) ? psgi_serv11 : psgi_serv10;
285 19 304 if (qpos != NULL) {
299 27 27 if (unlikely(!r->path)) feersum_set_path_and_query(aTHX_ r);
306 0 28 if (unlikely(!r->query)) feersum_set_path_and_query(aTHX_ r);
328 139 13 for (size_t i = 0; i < r->num_headers; i++) {
331 139 0 if (hdr->name && hdr->name_len == name_len &&
346 9 0 if (socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0, sv) == 0)
348 0 0 if (errno != EINVAL) return -1;
351 0 0 if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv) < 0)
354 0 0 fcntl(sv[1], F_SETFL, O_NONBLOCK) < 0 ||
355 0 0 fcntl(sv[0], F_SETFD, FD_CLOEXEC) < 0 ||
371 74 0 if (size > 0)
386 359 0 if (likely(clock_gettime(CLOCK_REALTIME_COARSE, &ts) == 0)) {
394 19 340 if (now == last_generated_time) return;
398 0 340 if (unlikely(!gmtime_r(&now, &tm_buf))) return;
420 1 448 if (len == 0) {
425 627 448 while (len > 0) {
429 627 448 while (t > tmp) {