Align ESI bodybytes accounting with #3354

Ref varnish-cache f087fe6d37679d8d709cfec85451fde4f68fbb95

Original patch by Poul-Henning Kamp <phk@FreeBSD.org>
parent 31778f3a
...@@ -40,6 +40,7 @@ client c1 { ...@@ -40,6 +40,7 @@ client c1 {
client c1 -run client c1 -run
logexpect l1 -wait logexpect l1 -wait
varnish v1 -expect esi_errors == 0 varnish v1 -expect esi_errors == 0
varnish v1 -expect MAIN.s_resp_bodybytes == 33
## HTTP/2 ## HTTP/2
......
...@@ -48,6 +48,7 @@ client c1 { ...@@ -48,6 +48,7 @@ client c1 {
client c1 -run client c1 -run
logexpect l1 -wait logexpect l1 -wait
varnish v1 -expect esi_errors == 2 varnish v1 -expect esi_errors == 2
varnish v1 -expect MAIN.s_resp_bodybytes == 40
## HTTP/2 ## HTTP/2
......
...@@ -37,6 +37,7 @@ client c1 { ...@@ -37,6 +37,7 @@ client c1 {
client c1 -run client c1 -run
varnish v1 -expect esi_errors == 0 varnish v1 -expect esi_errors == 0
varnish v1 -expect MAIN.s_resp_bodybytes == 35
## HTTP/2 ## HTTP/2
......
...@@ -98,6 +98,7 @@ client c1 { ...@@ -98,6 +98,7 @@ client c1 {
client c1 -run client c1 -run
varnish v1 -expect esi_errors == 0 varnish v1 -expect esi_errors == 0
varnish v1 -expect MAIN.s_resp_bodybytes == 150
delay 1 delay 1
logexpect l1 -v v1 -d 1 -g vxid -q "vxid == 1001" { logexpect l1 -v v1 -d 1 -g vxid -q "vxid == 1001" {
......
...@@ -47,6 +47,7 @@ client c1 { ...@@ -47,6 +47,7 @@ client c1 {
client c1 -run client c1 -run
varnish v1 -expect esi_errors == 0 varnish v1 -expect esi_errors == 0
varnish v1 -expect MAIN.s_resp_bodybytes == 67
## HTTP/2 ## HTTP/2
......
...@@ -40,6 +40,7 @@ client c1 { ...@@ -40,6 +40,7 @@ client c1 {
client c1 -run client c1 -run
varnish v1 -expect esi_errors == 0 varnish v1 -expect esi_errors == 0
varnish v1 -expect MAIN.s_resp_bodybytes == 67
## HTTP/2 ## HTTP/2
......
...@@ -57,6 +57,7 @@ client c1 { ...@@ -57,6 +57,7 @@ client c1 {
client c1 -run client c1 -run
varnish v1 -expect esi_errors == 0 varnish v1 -expect esi_errors == 0
varnish v1 -expect MAIN.s_resp_bodybytes == 78
# Now try with invalid URLs # Now try with invalid URLs
...@@ -93,18 +94,23 @@ client c1 { ...@@ -93,18 +94,23 @@ client c1 {
expect resp.status == 200 expect resp.status == 200
expect resp.bodylen == 4 expect resp.bodylen == 4
expect resp.body == "1234" expect resp.body == "1234"
} -run
varnish v1 -expect esi_errors == 1
varnish v1 -expect MAIN.s_resp_bodybytes == 82
client c1 {
txreq -url /https txreq -url /https
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.bodylen == 6 expect resp.bodylen == 6
expect resp.body == "123456" expect resp.body == "123456"
} } -run
client c1 -run
logexpect l1 -wait logexpect l1 -wait
varnish v1 -expect esi_errors == 2 varnish v1 -expect esi_errors == 2
varnish v1 -expect MAIN.s_resp_bodybytes == 88
## HTTP/2 ## HTTP/2
......
...@@ -61,6 +61,7 @@ client c1 { ...@@ -61,6 +61,7 @@ client c1 {
client c1 -run client c1 -run
varnish v1 -expect esi_errors == 0 varnish v1 -expect esi_errors == 0
varnish v1 -expect MAIN.s_resp_bodybytes == 120
## HTTP/2 ## HTTP/2
......
...@@ -178,6 +178,7 @@ logexpect l1 -wait ...@@ -178,6 +178,7 @@ logexpect l1 -wait
logexpect l2 -wait logexpect l2 -wait
logexpect l3 -wait logexpect l3 -wait
varnish v1 -expect esi_errors == 18 varnish v1 -expect esi_errors == 18
varnish v1 -expect MAIN.s_resp_bodybytes == 472
## HTTP/2 ## HTTP/2
......
...@@ -42,6 +42,7 @@ client c1 { ...@@ -42,6 +42,7 @@ client c1 {
} -run } -run
logexpect l1 -wait logexpect l1 -wait
varnish v1 -expect MAIN.s_resp_bodybytes == 57
varnish v1 -cli "param.set feature +esi_disable_xml_check" varnish v1 -cli "param.set feature +esi_disable_xml_check"
...@@ -57,6 +58,7 @@ client c1 { ...@@ -57,6 +58,7 @@ client c1 {
} }
} -run } -run
varnish v1 -expect esi_errors == 0 varnish v1 -expect esi_errors == 0
varnish v1 -expect MAIN.s_resp_bodybytes == 79
## HTTP/2 ## HTTP/2
......
...@@ -53,6 +53,7 @@ client c1 { ...@@ -53,6 +53,7 @@ client c1 {
varnish v1 -vsl_catchup varnish v1 -vsl_catchup
varnish v1 -expect esi_errors == 0 varnish v1 -expect esi_errors == 0
varnish v1 -expect MAIN.s_resp_bodybytes == 149
server s1 { server s1 {
rxreq rxreq
......
...@@ -245,6 +245,7 @@ client c1 { ...@@ -245,6 +245,7 @@ client c1 {
client c1 -run client c1 -run
varnish v1 -expect esi_errors == 0 varnish v1 -expect esi_errors == 0
varnish v1 -expect MAIN.s_resp_bodybytes == 684
varnish v1 -vsc MEMPOOL.pesi.* varnish v1 -vsc MEMPOOL.pesi.*
varnish v1 -expect MEMPOOL.pesi.pool > 0 varnish v1 -expect MEMPOOL.pesi.pool > 0
......
...@@ -83,6 +83,7 @@ logexpect l1 -wait ...@@ -83,6 +83,7 @@ logexpect l1 -wait
varnish v1 -expect esi_errors == 5 varnish v1 -expect esi_errors == 5
varnish v1 -expect esi_warnings == 1 varnish v1 -expect esi_warnings == 1
varnish v1 -expect MAIN.s_resp_bodybytes == 65856
## ##
## XXX: repeating this test with HTTP/2 fails both here and for ## XXX: repeating this test with HTTP/2 fails both here and for
......
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