From: phk Date: Wed, 25 Jun 2008 21:57:56 +0000 (+0000) Subject: Add chunked encoding from backend test. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=323d6ccd9a81ea08cb9b23885a664bda66af189a;p=varnish Add chunked encoding from backend test. Fix copy&paste mistake in test b00006 git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2814 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishtest/tests/b00006.vtc b/varnish-cache/bin/varnishtest/tests/b00006.vtc index a51826f1..02ee741d 100644 --- a/varnish-cache/bin/varnishtest/tests/b00006.vtc +++ b/varnish-cache/bin/varnishtest/tests/b00006.vtc @@ -22,4 +22,3 @@ client c1 -run server s1 -wait varnish v1 -stop -shell "rm ../varnishd/varnishtest_backing" diff --git a/varnish-cache/bin/varnishtest/tests/b00007.vtc b/varnish-cache/bin/varnishtest/tests/b00007.vtc new file mode 100644 index 00000000..5cc58d08 --- /dev/null +++ b/varnish-cache/bin/varnishtest/tests/b00007.vtc @@ -0,0 +1,43 @@ +# $Id$ + +test "Check chunked encoding from backend works" + +varnish v1 -arg "-s malloc -b 127.0.0.1:9080" -start + +server s1 { + rxreq + expect req.url == "/bar" + send "HTTP/1.1 200 Ok\r\n" + send "Transfer-encoding: chunked\r\n" + send "\r\n" + send "00000004\r\n1234\r\n" + send "00000000\r\n" + + rxreq + expect req.url == "/foo" + send "HTTP/1.1 200 Ok\r\n" + send "Transfer-encoding: chunked\r\n" + send "\r\n" + send "00000004\r\n1234\r\n" + send "00000004\r\n1234\r\n" + send "00000000\r\n" +} + +server s1 -start + +client c1 { + txreq -url "/bar" + rxresp + expect resp.status == 200 + expect resp.http.content-length == "4" + txreq -url "/foo" + rxresp + expect resp.status == 200 + expect resp.http.content-length == "8" +} + +client c1 -run + +server s1 -wait + +varnish v1 -stop