r369 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Fri Jul 7 09:22:15 CEST 2006


Author: phk
Date: 2006-07-07 09:22:15 +0200 (Fri, 07 Jul 2006)
New Revision: 369

Modified:
   trunk/varnish-cache/bin/varnishd/cache_pipe.c
Log:
Fix pipe mode


Modified: trunk/varnish-cache/bin/varnishd/cache_pipe.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_pipe.c	2006-07-07 07:22:01 UTC (rev 368)
+++ trunk/varnish-cache/bin/varnishd/cache_pipe.c	2006-07-07 07:22:15 UTC (rev 369)
@@ -47,24 +47,18 @@
 	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;




More information about the varnish-commit mailing list