parent 07b780cf
...@@ -16,6 +16,7 @@ varnish v1 -vcl+backend { ...@@ -16,6 +16,7 @@ varnish v1 -vcl+backend {
} }
sub vcl_deliver { sub vcl_deliver {
set resp.http.can_esi = obj.can_esi;
pesi.activate(); pesi.activate();
} }
} -start } -start
...@@ -30,6 +31,7 @@ client c1 { ...@@ -30,6 +31,7 @@ client c1 {
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.bodylen == 33 expect resp.bodylen == 33
expect resp.http.can_esi == "false"
expect resp.body == { expect resp.body == {
-This is a test: Hello world -This is a test: Hello world
} }
...@@ -49,6 +51,7 @@ client c1 { ...@@ -49,6 +51,7 @@ client c1 {
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.bodylen == 33 expect resp.bodylen == 33
expect resp.http.can_esi == "false"
expect resp.body == { expect resp.body == {
-This is a test: Hello world -This is a test: Hello world
} }
......
...@@ -23,6 +23,7 @@ varnish v1 -vcl+backend { ...@@ -23,6 +23,7 @@ varnish v1 -vcl+backend {
sub vcl_deliver { sub vcl_deliver {
pesi.activate(); pesi.activate();
set resp.http.filters = resp.filters; set resp.http.filters = resp.filters;
set resp.http.can_esi = obj.can_esi;
} }
} -start } -start
...@@ -37,6 +38,7 @@ client c1 { ...@@ -37,6 +38,7 @@ client c1 {
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.bodylen == 40 expect resp.bodylen == 40
expect resp.http.can_esi == "true"
expect resp.body == { expect resp.body == {
<esX>This is a test: Hello world <esX>This is a test: Hello world
......
...@@ -50,6 +50,7 @@ varnish v1 -arg "-p debug=+syncvsl" -vcl+backend { ...@@ -50,6 +50,7 @@ varnish v1 -arg "-p debug=+syncvsl" -vcl+backend {
sub vcl_deliver { sub vcl_deliver {
pesi.activate(); pesi.activate();
set resp.http.can_esi = obj.can_esi;
} }
} -start } -start
...@@ -58,6 +59,7 @@ client c1 { ...@@ -58,6 +59,7 @@ client c1 {
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.bodylen == 75 expect resp.bodylen == 75
expect resp.http.can_esi == "true"
expect resp.body == { expect resp.body == {
<html> <html>
Before include Before include
...@@ -74,6 +76,7 @@ client c1 { ...@@ -74,6 +76,7 @@ client c1 {
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.bodylen == 75 expect resp.bodylen == 75
expect resp.http.can_esi == "true"
expect resp.body == { expect resp.body == {
<html> <html>
Before include Before include
...@@ -99,7 +102,7 @@ delay 1 ...@@ -99,7 +102,7 @@ delay 1
logexpect l1 -v v1 -d 1 -g vxid -q "vxid == 1001" { logexpect l1 -v v1 -d 1 -g vxid -q "vxid == 1001" {
expect 0 1001 Begin "^req .* rxreq" expect 0 1001 Begin "^req .* rxreq"
expect * = ReqAcct "^29 0 29 187 (104|96) (291|283)$" expect * = ReqAcct "^29 0 29 202 (104|96) (306|298)$"
expect 0 = End expect 0 = End
} -run } -run
...@@ -124,7 +127,7 @@ logexpect l5 -v v1 -d 1 -g vxid -q "vxid == 1005" { ...@@ -124,7 +127,7 @@ logexpect l5 -v v1 -d 1 -g vxid -q "vxid == 1005" {
expect * 1005 Begin "^req .* rxreq" expect * 1005 Begin "^req .* rxreq"
# ReqAcct body counts include chunked overhead # ReqAcct body counts include chunked overhead
# Header bytes is 5 larger than in l1 due to two item X-Varnish hdr # Header bytes is 5 larger than in l1 due to two item X-Varnish hdr
expect * = ReqAcct "^29 0 29 192 (104|96) (296|288)$" expect * = ReqAcct "^29 0 29 207 (104|96) (311|303)$"
expect 0 = End expect 0 = End
} -run } -run
......
...@@ -21,6 +21,7 @@ varnish v1 -vcl+backend { ...@@ -21,6 +21,7 @@ varnish v1 -vcl+backend {
sub vcl_deliver { sub vcl_deliver {
pesi.activate(); pesi.activate();
set resp.http.can_esi = obj.can_esi;
} }
} -start } -start
...@@ -28,6 +29,7 @@ client c1 { ...@@ -28,6 +29,7 @@ client c1 {
txreq -hdr "Accept-Encoding: gzip" txreq -hdr "Accept-Encoding: gzip"
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.can_esi == "true"
gunzip gunzip
expect resp.bodylen == 3 expect resp.bodylen == 3
expect resp.body == "foo" expect resp.body == "foo"
...@@ -45,6 +47,7 @@ client c1 { ...@@ -45,6 +47,7 @@ client c1 {
txreq -hdr accept-encoding gzip txreq -hdr accept-encoding gzip
rxresp rxresp
expect resp.http.content-encoding == gzip expect resp.http.content-encoding == gzip
expect resp.http.can_esi == "true"
expect resp.status == 200 expect resp.status == 200
} -run } -run
} -run } -run
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment