From: phk Date: Fri, 7 Jul 2006 07:22:15 +0000 (+0000) Subject: Fix pipe mode X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e4f1a7f8a9c84c1b7b5e7e568bc46c830e0b46a;p=varnish Fix pipe mode git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@369 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_pipe.c b/varnish-cache/bin/varnishd/cache_pipe.c index 29fb9278..932e6b19 100644 --- a/varnish-cache/bin/varnishd/cache_pipe.c +++ b/varnish-cache/bin/varnishd/cache_pipe.c @@ -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;