{
unsigned l;
- AN(hh->b);
- AN(hh->e);
+ Tcheck(*hh);
AN(hdr);
l = hdr[0];
assert(l == strlen(hdr + 1));
unsigned u;
for (u = HTTP_HDR_FIRST; u < hp->nhd; u++) {
- AN(hp->hd[u].b);
- AN(hp->hd[u].e);
+ Tcheck(hp->hd[u]);
if (hp->hd[u].e < hp->hd[u].b + l + 1)
continue;
if (hp->hd[u].b[l] != ':')
http_GetStatus(const struct http *hp)
{
- AN(hp->hd[HTTP_HDR_STATUS].b);
+ Tcheck(hp->hd[HTTP_HDR_STATUS]);
return (strtoul(hp->hd[HTTP_HDR_STATUS].b,
NULL /* XXX */, 10));
}
const char *
http_GetProto(const struct http *hp)
{
- AN(hp->hd[HTTP_HDR_PROTO].b);
+
+ Tcheck(hp->hd[HTTP_HDR_PROTO]);
return (hp->hd[HTTP_HDR_PROTO].b);
}
const char *
http_GetReq(const struct http *hp)
{
- AN(hp->hd[HTTP_HDR_REQ].b);
+
+ Tcheck(hp->hd[HTTP_HDR_REQ]);
return (hp->hd[HTTP_HDR_REQ].b);
}
int
http_RecvPrepAgain(struct http *hp)
{
+
http_RecvPrep(hp);
if (hp->rx.b == hp->rx.e)
return (0);
{
assert(n < HTTP_HDR_MAX);
- AN(fm->hd[n].b);
- to->hd[n].b = fm->hd[n].b;
- to->hd[n].e = fm->hd[n].e;
+ Tcheck(fm->hd[n]);
+ to->hd[n] = fm->hd[n];
to->hdf[n] = fm->hdf[n];
}
CHECK_OBJ_NOTNULL(fm, HTTP_MAGIC);
CHECK_OBJ_NOTNULL(to, HTTP_MAGIC);
assert(n < HTTP_HDR_MAX);
- AN(fm->hd[n].b);
+ Tcheck(fm->hd[n]);
if (to->nhd < HTTP_HDR_MAX) {
- to->hd[to->nhd].b = fm->hd[n].b;
- to->hd[to->nhd].e = fm->hd[n].e;
+ to->hd[to->nhd] = fm->hd[n];
to->nhd++;
} else {
VSL_stats->losthdr++;