Commit 83d984c3 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Fix pipe mode


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@369 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 5251443e
......@@ -47,24 +47,18 @@ PipeSession(struct worker *w, struct sess *sp)
int fd, i;
void *fd_token;
struct edir e1, e2;
char *b, *e;
fd = VBE_GetFd(sp->backend, &fd_token, sp->xid);
assert(fd != -1);
http_BuildSbuf(fd, Build_Pipe, w->sb, sp->http); /* XXX: 0 ?? */
http_BuildSbuf(fd, Build_Pipe, w->sb, sp->http);
i = write(fd, sbuf_data(w->sb), sbuf_len(w->sb));
assert(i == sbuf_len(w->sb));
assert(__LINE__ == 0);
#if 0
{ int j;
j = 0;
i = sp->rcv_len - sp->rcv_ptr;
if (i > 0) {
j = write(sp->fd, sp->rcv + sp->rcv_ptr, i);
assert(j == i);
if (http_GetTail(sp->http, 99999999, &b, &e) && b != e) { /* XXX */
i = write(fd, b, e - b);
assert(i == e - b);
}
}
#endif
e1.fd = fd;
e2.fd = sp->fd;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment