[master] b5f1878 Remove the current "ping-pong" streaming code, it is in the way of the "real streaming" code we are working on.

Poul-Henning Kamp phk at varnish-cache.org
Wed Feb 15 12:44:09 CET 2012


commit b5f187859ccb6b92d06a445ef7f6b17a476149f7
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Feb 15 11:43:42 2012 +0000

    Remove the current "ping-pong" streaming code, it is in the way of
    the "real streaming" code we are working on.

diff --git a/bin/varnishd/cache/cache.h b/bin/varnishd/cache/cache.h
index a76cc45..a9051bc 100644
--- a/bin/varnishd/cache/cache.h
+++ b/bin/varnishd/cache/cache.h
@@ -608,15 +608,6 @@ struct req {
 #define RES_ESI_CHILD		(1<<5)
 #define RES_GUNZIP		(1<<6)
 
-	/* Stream gunzip instance */
-	struct vgz		*stream_vgz;
-
-	/* Next byte we will take from storage */
-	ssize_t			stream_next;
-
-	/* First byte of storage if we free it as we go (pass) */
-	ssize_t			stream_front;
-
 	/* Transaction VSL buffer */
 	struct vsl_log		vsl[1];
 
@@ -958,9 +949,6 @@ void WSL_Flush(struct vsl_log *, int overflow);
 /* cache_response.c */
 void RES_BuildHttp(const struct sess *sp);
 void RES_WriteObj(struct sess *sp);
-void RES_StreamStart(struct sess *sp);
-void RES_StreamEnd(struct sess *sp);
-void RES_StreamPoll(struct worker *);
 
 /* cache_vary.c */
 struct vsb *VRY_Create(const struct sess *sp, const struct http *hp);
diff --git a/bin/varnishd/cache/cache_center.c b/bin/varnishd/cache/cache_center.c
index 0be9304..4b0429a 100644
--- a/bin/varnishd/cache/cache_center.c
+++ b/bin/varnishd/cache/cache_center.c
@@ -194,7 +194,6 @@ DOT	]
 DOT	prepresp -> deliver [style=bold,color=green,label=deliver]
 DOT	prepresp -> deliver [style=bold,color=red]
 DOT	prepresp -> deliver [style=bold,color=blue]
-DOT     prepresp -> streambody [style=bold,color=cyan,label="deliver"]
 DOT }
  *
  */
@@ -300,12 +299,7 @@ cnt_prepresp(struct sess *sp, struct worker *wrk, struct req *req)
 	default:
 		WRONG("Illegal action in vcl_deliver{}");
 	}
-	if (wrk->busyobj != NULL && wrk->busyobj->do_stream) {
-		AssertObjCorePassOrBusy(req->obj->objcore);
-		sp->step = STP_STREAMBODY;
-	} else {
-		sp->step = STP_DELIVER;
-	}
+	sp->step = STP_DELIVER;
 	return (0);
 }
 
@@ -858,13 +852,8 @@ cnt_prepfetch(struct sess *sp, struct worker *wrk, struct req *req)
 
 	AssertObjCorePassOrBusy(req->obj->objcore);
 
-	if (bo->do_stream) {
-		sp->step = STP_PREPRESP;
-		return (0);
-	} else {
-		sp->step = STP_FETCHBODY;
-		return (0);
-	}
+	sp->step = STP_FETCHBODY;
+	return (0);
 }
 
 /*--------------------------------------------------------------------
@@ -925,63 +914,6 @@ cnt_fetchbody(struct sess *sp, struct worker *wrk, struct req *req)
 }
 
 /*--------------------------------------------------------------------
- * Stream the body as we fetch it
-DOT subgraph xstreambody {
-DOT	streambody [
-DOT		shape=record
-DOT		label="{cnt_streambody:|ping_pong\nfetch/deliver}"
-DOT	]
-DOT }
-DOT streambody -> DONE [style=bold,color=cyan]
- */
-
-static int
-cnt_streambody(struct sess *sp, struct worker *wrk, struct req *req)
-{
-	int i;
-
-	CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
-	CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
-	CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
-
-	CHECK_OBJ_NOTNULL(wrk->busyobj, BUSYOBJ_MAGIC);
-
-	RES_StreamStart(sp);
-
-	AssertObjCorePassOrBusy(req->obj->objcore);
-
-	i = FetchBody(wrk, req->obj);
-
-	http_Teardown(wrk->busyobj->bereq);
-	http_Teardown(wrk->busyobj->beresp);
-	wrk->busyobj->vfp = NULL;
-	AZ(wrk->busyobj->vbc);
-	AN(req->director);
-
-	if (!i && req->obj->objcore != NULL) {
-		EXP_Insert(req->obj);
-		AN(req->obj->objcore);
-		AN(req->obj->objcore->ban);
-		AZ(req->obj->ws_o->overflow);
-		HSH_Unbusy(req->obj->objcore);
-	} else {
-		req->doclose = "Stream error";
-	}
-	wrk->acct_tmp.fetch++;
-	req->director = NULL;
-	req->restarts = 0;
-
-	RES_StreamEnd(sp);
-
-	assert(WRW_IsReleased(wrk));
-	(void)HSH_Deref(&wrk->stats, NULL, &req->obj);
-	VBO_DerefBusyObj(wrk, &wrk->busyobj);
-	http_Teardown(req->resp);
-	sp->step = STP_DONE;
-	return (0);
-}
-
-/*--------------------------------------------------------------------
  * A freshly accepted socket
  *
 DOT subgraph xcluster_first {
diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index 2924130..cd01b59 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -126,8 +126,6 @@ vfp_nop_bytes(struct worker *wrk, struct http_conn *htc, ssize_t bytes)
 		st->len += wl;
 		wrk->busyobj->fetch_obj->len += wl;
 		bytes -= wl;
-		if (wrk->busyobj->do_stream)
-			RES_StreamPoll(wrk);
 	}
 	return (1);
 }
diff --git a/bin/varnishd/cache/cache_gzip.c b/bin/varnishd/cache/cache_gzip.c
index 38c323f..d16d4b1 100644
--- a/bin/varnishd/cache/cache_gzip.c
+++ b/bin/varnishd/cache/cache_gzip.c
@@ -472,8 +472,6 @@ vfp_gunzip_bytes(struct worker *wrk, struct http_conn *htc, ssize_t bytes)
 		if (i != VGZ_OK && i != VGZ_END)
 			return(FetchError(wrk->busyobj, "Gunzip data error"));
 		wrk->busyobj->fetch_obj->len += dl;
-		if (wrk->busyobj->do_stream)
-			RES_StreamPoll(wrk);
 	}
 	assert(i == Z_OK || i == Z_STREAM_END);
 	return (1);
@@ -554,8 +552,6 @@ vfp_gzip_bytes(struct worker *wrk, struct http_conn *htc, ssize_t bytes)
 		i = VGZ_Gzip(vg, &dp, &dl, VGZ_NORMAL);
 		assert(i == Z_OK);
 		wrk->busyobj->fetch_obj->len += dl;
-		if (wrk->busyobj->do_stream)
-			RES_StreamPoll(wrk);
 	}
 	return (1);
 }
@@ -584,8 +580,6 @@ vfp_gzip_end(struct worker *wrk)
 		i = VGZ_Gzip(vg, &dp, &dl, VGZ_FINISH);
 		wrk->busyobj->fetch_obj->len += dl;
 	} while (i != Z_STREAM_END);
-	if (wrk->busyobj->do_stream)
-		RES_StreamPoll(wrk);
 	VGZ_UpdateObj(vg, wrk->busyobj->fetch_obj);
 	if (VGZ_Destroy(&vg) != VGZ_END)
 		return(FetchError(wrk->busyobj, "Gzip error at the very end"));
@@ -646,8 +640,6 @@ vfp_testgzip_bytes(struct worker *wrk, struct http_conn *htc, ssize_t bytes)
 		VGZ_Ibuf(vg, st->ptr + st->len, wl);
 		st->len += wl;
 		wrk->busyobj->fetch_obj->len += wl;
-		if (wrk->busyobj->do_stream)
-			RES_StreamPoll(wrk);
 
 		while (!VGZ_IbufEmpty(vg)) {
 			VGZ_Obuf(vg, vg->m_buf, vg->m_sz);
diff --git a/bin/varnishd/cache/cache_response.c b/bin/varnishd/cache/cache_response.c
index 125440b..bbb648c 100644
--- a/bin/varnishd/cache/cache_response.c
+++ b/bin/varnishd/cache/cache_response.c
@@ -305,115 +305,3 @@ RES_WriteObj(struct sess *sp)
 	if (WRW_FlushRelease(sp->wrk) && sp->fd >= 0)
 		SES_Close(sp, "remote closed");
 }
-
-/*--------------------------------------------------------------------*/
-
-void
-RES_StreamStart(struct sess *sp)
-{
-	struct req *req;
-
-	req = sp->req;
-	CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
-
-	AZ(req->res_mode & RES_ESI_CHILD);
-	AN(req->wantbody);
-	AZ(req->stream_vgz);
-	AZ(req->stream_next);
-	AZ(req->stream_front);
-
-	WRW_Reserve(sp->wrk, &sp->fd);
-
-	if (req->res_mode & RES_GUNZIP) {
-		req->stream_vgz = VGZ_NewUngzip(sp->wrk->vsl, "U S -");
-		AZ(VGZ_WrwInit(req->stream_vgz));
-		http_Unset(req->resp, H_Content_Encoding);
-	}
-
-	if (!(req->res_mode & RES_CHUNKED) &&
-	    sp->wrk->busyobj->h_content_length != NULL)
-		http_PrintfHeader(sp->req->resp,
-		    "Content-Length: %s", sp->wrk->busyobj->h_content_length);
-
-	sp->wrk->acct_tmp.hdrbytes +=
-	    http_Write(sp->wrk, sp->req->resp, 1);
-
-	if (req->res_mode & RES_CHUNKED)
-		WRW_Chunked(sp->wrk);
-}
-
-void
-RES_StreamPoll(struct worker *wrk)
-{
-	struct storage *st;
-	struct busyobj *bo;
-	struct req *req;
-	ssize_t l, l2;
-	void *ptr;
-
-	CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
-	bo = wrk->busyobj;
-	CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC);
-	CHECK_OBJ_NOTNULL(bo->fetch_obj, OBJECT_MAGIC);
-	req = wrk->sp->req;
-	CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
-	if (bo->fetch_obj->len == req->stream_next)
-		return;
-	assert(bo->fetch_obj->len > req->stream_next);
-	l = req->stream_front;
-	VTAILQ_FOREACH(st, &bo->fetch_obj->store, list) {
-		if (st->len + l <= req->stream_next) {
-			l += st->len;
-			continue;
-		}
-		l2 = st->len + l - req->stream_next;
-		ptr = st->ptr + (req->stream_next - l);
-		if (wrk->sp->req->res_mode & RES_GUNZIP)
-			(void)VGZ_WrwGunzip(wrk, req->stream_vgz, ptr, l2);
-		else
-			(void)WRW_Write(wrk, ptr, l2);
-		l += st->len;
-		req->stream_next += l2;
-	}
-	if (!(wrk->sp->req->res_mode & RES_GUNZIP))
-		(void)WRW_Flush(wrk);
-
-	if (bo->fetch_obj->objcore == NULL ||
-	    (bo->fetch_obj->objcore->flags & OC_F_PASS)) {
-		/*
-		 * This is a pass object, release storage as soon as we
-		 * have delivered it.
-		 */
-		while (1) {
-			st = VTAILQ_FIRST(&bo->fetch_obj->store);
-			if (st == NULL ||
-			    req->stream_front + st->len > req->stream_next)
-				break;
-			VTAILQ_REMOVE(&bo->fetch_obj->store, st, list);
-			req->stream_front += st->len;
-			STV_free(st);
-		}
-	}
-}
-
-void
-RES_StreamEnd(struct sess *sp)
-{
-	struct req *req;
-
-	req = sp->req;
-	CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
-
-	if (req->res_mode & RES_GUNZIP) {
-		AN(req->stream_vgz);
-		VGZ_WrwFlush(sp->wrk, req->stream_vgz);
-		(void)VGZ_Destroy(&req->stream_vgz);
-	}
-	if (req->res_mode & RES_CHUNKED && !(req->res_mode & RES_ESI_CHILD))
-		WRW_EndChunk(sp->wrk);
-	if (WRW_FlushRelease(sp->wrk))
-		SES_Close(sp, "remote closed");
-	req->stream_vgz = NULL;
-	req->stream_next = 0;
-	req->stream_front = 0;
-}
diff --git a/bin/varnishtest/tests.disabled/r00929.vtc b/bin/varnishtest/tests.disabled/r00929.vtc
new file mode 100644
index 0000000..3b2f7ca
--- /dev/null
+++ b/bin/varnishtest/tests.disabled/r00929.vtc
@@ -0,0 +1,26 @@
+varnishtest "stream test"
+
+
+server s1 {
+	rxreq
+	txresp -bodylen 400
+} -start
+
+varnish v1 -vcl+backend {
+
+	sub vcl_fetch {
+		set beresp.do_stream = true;
+	}
+
+} -start
+
+client c1 {
+	txreq
+	rxresp
+	expect resp.bodylen == 400
+	txreq
+	rxresp
+	expect resp.bodylen == 400
+} -run
+
+
diff --git a/bin/varnishtest/tests.disabled/r00978.vtc b/bin/varnishtest/tests.disabled/r00978.vtc
new file mode 100644
index 0000000..39b89cb
--- /dev/null
+++ b/bin/varnishtest/tests.disabled/r00978.vtc
@@ -0,0 +1,40 @@
+varnishtest "r00978.vtc Test esi_level > 0 and do_stream"
+
+server s1 {
+	rxreq
+	expect req.url == "/"
+	txresp -body {
+		<html>
+		Before include
+		<esi:include src="/body" sr="foo"/>
+		After include
+	}
+	rxreq
+	expect req.url == "/body1"
+	txresp -body {
+		Included file
+	}
+} -start
+
+varnish v1 -vcl+backend {
+	sub vcl_recv {
+		if (req.esi_level > 0) {
+			set req.url = req.url + req.esi_level;
+		}
+	}
+	sub vcl_fetch {
+		if (req.url == "/") {
+			set beresp.do_esi = true;
+		}
+		set beresp.do_stream = true;
+	}
+} -start
+
+client c1 {
+	txreq
+	rxresp
+	expect resp.bodylen == 65
+	expect resp.status == 200
+} -run
+
+varnish v1 -expect esi_errors == 0
diff --git a/bin/varnishtest/tests.disabled/r00979.vtc b/bin/varnishtest/tests.disabled/r00979.vtc
new file mode 100644
index 0000000..bc72efc
--- /dev/null
+++ b/bin/varnishtest/tests.disabled/r00979.vtc
@@ -0,0 +1,29 @@
+varnishtest "r00979.vtc Test restart when do_stream in vcl_deliver"
+
+server s1 {
+	rxreq
+	txresp -status 200 -body "1"
+	expect_close
+
+	accept
+	rxreq
+	txresp -status 200 -body "11"
+} -start
+
+varnish v1 -vcl+backend {
+	sub vcl_fetch {
+		set beresp.do_stream = true;
+	}
+	sub vcl_deliver {
+		if (req.restarts == 0) {
+			return (restart);
+		}
+	}
+} -start
+
+client c1 {
+	txreq
+	rxresp
+	expect resp.status == 200
+	expect resp.bodylen == 2
+} -run
diff --git a/bin/varnishtest/tests.disabled/r00980.vtc b/bin/varnishtest/tests.disabled/r00980.vtc
new file mode 100644
index 0000000..b7d307e
--- /dev/null
+++ b/bin/varnishtest/tests.disabled/r00980.vtc
@@ -0,0 +1,29 @@
+varnishtest "r00980 test gzip on fetch with content_length and do_stream"
+
+server s1 {
+	rxreq
+	expect req.url == "/foobar"
+	expect req.http.accept-encoding == "gzip"
+	txresp -bodylen 43
+} -start
+
+varnish v1 -cliok "param.set http_gzip_support true" -vcl+backend {
+
+	sub vcl_fetch {
+		set beresp.do_gzip = true;
+		set beresp.do_stream = true;
+	}
+} -start
+
+client c1 {
+	txreq -url /foobar -hdr "Accept-Encoding: gzip"
+	rxresp
+	expect resp.http.content-encoding == "gzip"
+	gunzip
+	expect resp.bodylen == 43
+
+	txreq -url /foobar 
+	rxresp
+	expect resp.http.content-encoding == <undef>
+	expect resp.bodylen == 43
+} -run
diff --git a/bin/varnishtest/tests.disabled/t00000.vtc b/bin/varnishtest/tests.disabled/t00000.vtc
new file mode 100644
index 0000000..57ab7c7
--- /dev/null
+++ b/bin/varnishtest/tests.disabled/t00000.vtc
@@ -0,0 +1,48 @@
+varnishtest "Ticket #873"
+
+server s1 {
+	rxreq 
+	txresp -nolen -hdr "Transfer-encoding: chunked"
+	chunked "<1>------------------------<1>\n"
+	sema r1 sync 2
+	chunked "<2>------------------------<2>\n"
+	sema r2 sync 2
+	chunked "<3>------------------------<3>\n"
+	sema r1 sync 2
+	chunked "<4>------------------------<4>\n"
+	sema r2 sync 2
+	chunkedlen 0
+} -start
+
+varnish v1 -vcl+backend {
+	sub vcl_fetch {
+		set beresp.do_stream = true;
+	}
+} -start 
+
+varnish v1 -cliok "param.set diag_bitmap 1"
+
+client c1 {
+	txreq  -hdr "foo: /foo"
+	rxresp -no_obj
+
+	rxchunk
+	expect resp.chunklen == 31
+	sema r1 sync 2
+
+	rxchunk
+	expect resp.chunklen == 31
+	sema r2 sync 2
+
+	rxchunk
+	expect resp.chunklen == 31
+	sema r1 sync 2
+
+	rxchunk
+	expect resp.chunklen == 31
+	sema r2 sync 2
+
+	rxchunk
+	expect resp.chunklen == 0
+	expect resp.bodylen == 124
+} -run
diff --git a/bin/varnishtest/tests.disabled/t00001.vtc b/bin/varnishtest/tests.disabled/t00001.vtc
new file mode 100644
index 0000000..2237466
--- /dev/null
+++ b/bin/varnishtest/tests.disabled/t00001.vtc
@@ -0,0 +1,50 @@
+varnishtest "Test stream/gunzip"
+
+server s1 {
+	rxreq
+	expect req.url == "/bar"
+	txresp -body "foobar"
+
+	rxreq
+	expect req.url == "/bla"
+	expect req.http.accept-encoding == "gzip"
+	txresp -gzipbody blablabla
+
+	rxreq
+	expect req.url == "/foo"
+	txresp -body "snafu"
+
+	rxreq
+	expect req.url == "/barf"
+	expect req.http.accept-encoding == "gzip"
+	txresp -gzipbody Iamoutofnonsensewords
+
+} -start
+
+varnish v1 -vcl+backend {
+	sub vcl_fetch {
+		if (req.url == "/foo") {
+			set beresp.do_gzip = true;
+		}
+		if (req.url == "/barf") {
+			set beresp.do_gunzip = true;
+		}
+		set beresp.do_stream = true;
+	}
+} -start 
+
+client c1 {
+	txreq  -url /bar
+	rxresp 
+	expect resp.http.content-length == 6
+	expect resp.bodylen == 6
+	txreq  -url /bla
+	rxresp 
+	expect resp.bodylen == 9
+	txreq  -url /foo
+	rxresp 
+	expect resp.bodylen == 5
+	txreq  -url /barf
+	rxresp 
+	expect resp.bodylen == 21
+} -run
diff --git a/bin/varnishtest/tests/r00929.vtc b/bin/varnishtest/tests/r00929.vtc
deleted file mode 100644
index 3b2f7ca..0000000
--- a/bin/varnishtest/tests/r00929.vtc
+++ /dev/null
@@ -1,26 +0,0 @@
-varnishtest "stream test"
-
-
-server s1 {
-	rxreq
-	txresp -bodylen 400
-} -start
-
-varnish v1 -vcl+backend {
-
-	sub vcl_fetch {
-		set beresp.do_stream = true;
-	}
-
-} -start
-
-client c1 {
-	txreq
-	rxresp
-	expect resp.bodylen == 400
-	txreq
-	rxresp
-	expect resp.bodylen == 400
-} -run
-
-
diff --git a/bin/varnishtest/tests/r00978.vtc b/bin/varnishtest/tests/r00978.vtc
deleted file mode 100644
index 39b89cb..0000000
--- a/bin/varnishtest/tests/r00978.vtc
+++ /dev/null
@@ -1,40 +0,0 @@
-varnishtest "r00978.vtc Test esi_level > 0 and do_stream"
-
-server s1 {
-	rxreq
-	expect req.url == "/"
-	txresp -body {
-		<html>
-		Before include
-		<esi:include src="/body" sr="foo"/>
-		After include
-	}
-	rxreq
-	expect req.url == "/body1"
-	txresp -body {
-		Included file
-	}
-} -start
-
-varnish v1 -vcl+backend {
-	sub vcl_recv {
-		if (req.esi_level > 0) {
-			set req.url = req.url + req.esi_level;
-		}
-	}
-	sub vcl_fetch {
-		if (req.url == "/") {
-			set beresp.do_esi = true;
-		}
-		set beresp.do_stream = true;
-	}
-} -start
-
-client c1 {
-	txreq
-	rxresp
-	expect resp.bodylen == 65
-	expect resp.status == 200
-} -run
-
-varnish v1 -expect esi_errors == 0
diff --git a/bin/varnishtest/tests/r00979.vtc b/bin/varnishtest/tests/r00979.vtc
deleted file mode 100644
index bc72efc..0000000
--- a/bin/varnishtest/tests/r00979.vtc
+++ /dev/null
@@ -1,29 +0,0 @@
-varnishtest "r00979.vtc Test restart when do_stream in vcl_deliver"
-
-server s1 {
-	rxreq
-	txresp -status 200 -body "1"
-	expect_close
-
-	accept
-	rxreq
-	txresp -status 200 -body "11"
-} -start
-
-varnish v1 -vcl+backend {
-	sub vcl_fetch {
-		set beresp.do_stream = true;
-	}
-	sub vcl_deliver {
-		if (req.restarts == 0) {
-			return (restart);
-		}
-	}
-} -start
-
-client c1 {
-	txreq
-	rxresp
-	expect resp.status == 200
-	expect resp.bodylen == 2
-} -run
diff --git a/bin/varnishtest/tests/r00980.vtc b/bin/varnishtest/tests/r00980.vtc
deleted file mode 100644
index b7d307e..0000000
--- a/bin/varnishtest/tests/r00980.vtc
+++ /dev/null
@@ -1,29 +0,0 @@
-varnishtest "r00980 test gzip on fetch with content_length and do_stream"
-
-server s1 {
-	rxreq
-	expect req.url == "/foobar"
-	expect req.http.accept-encoding == "gzip"
-	txresp -bodylen 43
-} -start
-
-varnish v1 -cliok "param.set http_gzip_support true" -vcl+backend {
-
-	sub vcl_fetch {
-		set beresp.do_gzip = true;
-		set beresp.do_stream = true;
-	}
-} -start
-
-client c1 {
-	txreq -url /foobar -hdr "Accept-Encoding: gzip"
-	rxresp
-	expect resp.http.content-encoding == "gzip"
-	gunzip
-	expect resp.bodylen == 43
-
-	txreq -url /foobar 
-	rxresp
-	expect resp.http.content-encoding == <undef>
-	expect resp.bodylen == 43
-} -run
diff --git a/bin/varnishtest/tests/t00000.vtc b/bin/varnishtest/tests/t00000.vtc
deleted file mode 100644
index 57ab7c7..0000000
--- a/bin/varnishtest/tests/t00000.vtc
+++ /dev/null
@@ -1,48 +0,0 @@
-varnishtest "Ticket #873"
-
-server s1 {
-	rxreq 
-	txresp -nolen -hdr "Transfer-encoding: chunked"
-	chunked "<1>------------------------<1>\n"
-	sema r1 sync 2
-	chunked "<2>------------------------<2>\n"
-	sema r2 sync 2
-	chunked "<3>------------------------<3>\n"
-	sema r1 sync 2
-	chunked "<4>------------------------<4>\n"
-	sema r2 sync 2
-	chunkedlen 0
-} -start
-
-varnish v1 -vcl+backend {
-	sub vcl_fetch {
-		set beresp.do_stream = true;
-	}
-} -start 
-
-varnish v1 -cliok "param.set diag_bitmap 1"
-
-client c1 {
-	txreq  -hdr "foo: /foo"
-	rxresp -no_obj
-
-	rxchunk
-	expect resp.chunklen == 31
-	sema r1 sync 2
-
-	rxchunk
-	expect resp.chunklen == 31
-	sema r2 sync 2
-
-	rxchunk
-	expect resp.chunklen == 31
-	sema r1 sync 2
-
-	rxchunk
-	expect resp.chunklen == 31
-	sema r2 sync 2
-
-	rxchunk
-	expect resp.chunklen == 0
-	expect resp.bodylen == 124
-} -run
diff --git a/bin/varnishtest/tests/t00001.vtc b/bin/varnishtest/tests/t00001.vtc
deleted file mode 100644
index 2237466..0000000
--- a/bin/varnishtest/tests/t00001.vtc
+++ /dev/null
@@ -1,50 +0,0 @@
-varnishtest "Test stream/gunzip"
-
-server s1 {
-	rxreq
-	expect req.url == "/bar"
-	txresp -body "foobar"
-
-	rxreq
-	expect req.url == "/bla"
-	expect req.http.accept-encoding == "gzip"
-	txresp -gzipbody blablabla
-
-	rxreq
-	expect req.url == "/foo"
-	txresp -body "snafu"
-
-	rxreq
-	expect req.url == "/barf"
-	expect req.http.accept-encoding == "gzip"
-	txresp -gzipbody Iamoutofnonsensewords
-
-} -start
-
-varnish v1 -vcl+backend {
-	sub vcl_fetch {
-		if (req.url == "/foo") {
-			set beresp.do_gzip = true;
-		}
-		if (req.url == "/barf") {
-			set beresp.do_gunzip = true;
-		}
-		set beresp.do_stream = true;
-	}
-} -start 
-
-client c1 {
-	txreq  -url /bar
-	rxresp 
-	expect resp.http.content-length == 6
-	expect resp.bodylen == 6
-	txreq  -url /bla
-	rxresp 
-	expect resp.bodylen == 9
-	txreq  -url /foo
-	rxresp 
-	expect resp.bodylen == 5
-	txreq  -url /barf
-	rxresp 
-	expect resp.bodylen == 21
-} -run
diff --git a/include/tbl/steps.h b/include/tbl/steps.h
index 1e95529..e6738cb 100644
--- a/include/tbl/steps.h
+++ b/include/tbl/steps.h
@@ -41,7 +41,6 @@ STEP(hit,		HIT,		(sp, sp->wrk, sp->req))
 STEP(fetch,		FETCH,		(sp, sp->wrk, sp->req))
 STEP(prepfetch,		PREPFETCH,	(sp, sp->wrk, sp->req))
 STEP(fetchbody,		FETCHBODY,	(sp, sp->wrk, sp->req))
-STEP(streambody,	STREAMBODY,	(sp, sp->wrk, sp->req))
 STEP(prepresp,		PREPRESP,	(sp, sp->wrk, sp->req))
 STEP(deliver,		DELIVER,	(sp, sp->wrk, sp->req))
 STEP(error,		ERROR,		(sp, sp->wrk, sp->req))



More information about the varnish-commit mailing list