*b = hp->t;
*e = hp->t + len;
hp->t += len;
+ assert(hp->t <= hp->v);
return (1);
}
;
VSLR(SLT_Request, fd, hp->req, p);
*p++ = '\0';
+ assert(!strcmp(hp->req, "GET"));
/* Next find the URI */
while (isspace(*p))
VSLR(SLT_LostHeader, fd, p, q);
}
}
+ assert(hp->t <= hp->v);
assert(hp->t == r);
}
continue;
break;
}
- hp->t = ++p;
+ if (++p > hp->v)
+ return (0);
+ hp->t = p;
+ assert(hp->t <= hp->v);
return (1);
}
unsigned l;
assert(hp != NULL);
+ assert(hp->v <= hp->e);
+ assert(hp->t <= hp->v);
VSL(SLT_Debug, fd, "Recv t %u v %u", hp->t - hp->s, hp->v - hp->s);
if (hp->t > hp->s && hp->t < hp->v) {
l = hp->v - hp->t;