while (cl != 0) {
i = read(fd, p, cl);
- assert(i > 0);
+ assert(i > 0); /* XXX seen */
p += i;
cl -= i;
}
sp->obj->xid = sp->xid;
fd = VBE_GetFd(sp->backend, &fd_token, sp->xid);
+ if (fd == -1)
+ fd = VBE_GetFd(sp->backend, &fd_token, sp->xid);
assert(fd != -1); /* XXX: handle this */
VSL(SLT_Backend, sp->fd, "%d %s", fd, sp->backend->vcl_name);
sbuf_finish(w->sb);
sp->obj->header = strdup(sbuf_data(w->sb));
+ VSL(SLT_Response, sp->fd, "%u", sp->obj->response);
+ VSL(SLT_Length, sp->fd, "%u", sp->obj->len);
+
vca_write_obj(sp, sp->obj->header, 0);
if (http_GetHdr(hp, "Connection", &b) && !strcasecmp(b, "close"))
* Initial cacheability determination per [RFC2616, 13.4]
* We do not support ranges yet, so 206 is out.
*/
- switch (http_GetStatus(hp)) {
+ sp->obj->response = http_GetStatus(hp);
+ switch (sp->obj->response) {
case 200: /* OK */
sp->obj->valid = 1;
/* FALLTHROUGH */