]> err.no Git - varnish/commitdiff
Make the ESI testcases start with an XML tag to satsify our new
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 24 Jul 2008 22:09:25 +0000 (22:09 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 24 Jul 2008 22:09:25 +0000 (22:09 +0000)
non-XML detector logic.

Add a testcase to see if it works and that we can override it.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3018 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishtest/tests/e00003.vtc
varnish-cache/bin/varnishtest/tests/e00004.vtc
varnish-cache/bin/varnishtest/tests/e00005.vtc
varnish-cache/bin/varnishtest/tests/e00006.vtc
varnish-cache/bin/varnishtest/tests/e00007.vtc
varnish-cache/bin/varnishtest/tests/e00008.vtc
varnish-cache/bin/varnishtest/tests/e00009.vtc [new file with mode: 0644]

index 85675e205fbe6a631937c82eb9545809c583ef2e..61d8821006a008219ab455a64d3c5bcfe5dc71c4 100644 (file)
@@ -6,6 +6,7 @@ test "ESI include"
 server s1 {
        rxreq 
        txresp -body {
+               <html>
                Before include
                <esi:include src="/body"/>
                After include
index 4e829214cf7b40d6df8f6b81be2bace209058799..1a4305076b9a1d3d4732f90e73c8a2a693d28683 100644 (file)
@@ -6,6 +6,7 @@ test "ESI commented include"
 server s1 {
        rxreq 
        txresp -body {
+               <html>
                Before include
                <!--esi <esi:include src="/body"/> -->
                After include
index 94f3df63f54b96fed05a6ab7b0f7868677e7aec2..b886b7d54a5807da169bbde1eec6429075b722b2 100644 (file)
@@ -7,6 +7,7 @@ server s1 {
        rxreq 
        expect req.url == "/foo/bar"
        txresp -body {
+               <html>
                Before include
                <!--esi <esi:include src="body"/> -->
                After include
index 8f2f98aa64f3c7192fd8538cf2798f70bb7a52ba..d503900b64d4804de24684775e5a6ff399b1b612 100644 (file)
@@ -7,6 +7,7 @@ server s1 {
        rxreq 
        expect req.url == "/foo/bar"
        txresp -body {
+               <html>
                Before include
                <!--esi <esi:include src="http://bozz/body"/> -->
                After include
index 332dcf38134e764b9fb3b0b6a2d0a08f07beb009..992d5f4cefda55492ae0f553596685a2b1c6b5f8 100644 (file)
@@ -8,6 +8,7 @@ server s1 {
        expect req.url == "/foo/bar"
        txresp -hdr "Connection: close"
        send {
+               <html>
                This is before the test
                <![CDATA[fooooooobar]]>
                <esi:remove>
index 99a44b9c098c52d7f6ee80c61336dff3e495ca44..9ff7fe0a8126143b6f2153b10481e6f1dc475db5 100644 (file)
@@ -5,6 +5,7 @@ test "ESI parsing errors"
 server s1 {
        rxreq 
        txresp -body {
+               <html>
                Before include
                <!--esi <esi:include src="/body"/> -->
                After include
diff --git a/varnish-cache/bin/varnishtest/tests/e00009.vtc b/varnish-cache/bin/varnishtest/tests/e00009.vtc
new file mode 100644 (file)
index 0000000..a60b15f
--- /dev/null
@@ -0,0 +1,44 @@
+# $Id: e00008.vtc 3012 2008-07-24 12:22:35Z des $
+
+test "ESI binary detector"
+
+server s1 {
+       rxreq 
+       txresp -body {
+               Before include
+               <esi:remove>
+                       bar
+               </esi:remove>
+               <esi:include
+       }
+       rxreq 
+       txresp -body {
+               Before include
+               <esi:remove>
+                       bar
+               </esi:remove>
+               <esi:include
+       }
+} -start
+
+varnish v1 -vcl+backend {
+       sub vcl_fetch {
+               esi;
+       }
+} -start
+
+client c1 {
+       txreq 
+       rxresp
+       expect resp.status == 200
+       expect resp.http.content-length == 72
+} -run
+
+varnish v1  -cli "param.set esi_syntax 1" 
+
+client c1 {
+       txreq -url bar
+       rxresp
+       expect resp.status == 200
+       expect resp.http.transfer-encoding == "chunked"
+} -run