Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
f087fe6d
Commit
f087fe6d
authored
Oct 05, 2020
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Align ESI bodybytes accounting with #3354
parent
17b9cfad
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
30 additions
and
5 deletions
+30
-5
cache_esi_deliver.c
bin/varnishd/cache/cache_esi_deliver.c
+2
-2
e00000.vtc
bin/varnishtest/tests/e00000.vtc
+1
-0
e00001.vtc
bin/varnishtest/tests/e00001.vtc
+1
-0
e00002.vtc
bin/varnishtest/tests/e00002.vtc
+1
-0
e00003.vtc
bin/varnishtest/tests/e00003.vtc
+1
-0
e00004.vtc
bin/varnishtest/tests/e00004.vtc
+1
-0
e00005.vtc
bin/varnishtest/tests/e00005.vtc
+1
-0
e00006.vtc
bin/varnishtest/tests/e00006.vtc
+9
-3
e00007.vtc
bin/varnishtest/tests/e00007.vtc
+1
-0
e00008.vtc
bin/varnishtest/tests/e00008.vtc
+1
-0
e00009.vtc
bin/varnishtest/tests/e00009.vtc
+2
-0
e00012.vtc
bin/varnishtest/tests/e00012.vtc
+3
-0
e00015.vtc
bin/varnishtest/tests/e00015.vtc
+3
-0
e00016.vtc
bin/varnishtest/tests/e00016.vtc
+1
-0
e00017.vtc
bin/varnishtest/tests/e00017.vtc
+1
-0
e00019.vtc
bin/varnishtest/tests/e00019.vtc
+1
-0
No files found.
bin/varnishd/cache/cache_esi_deliver.c
View file @
f087fe6d
...
...
@@ -475,7 +475,7 @@ static inline int
ved_bytes
(
struct
req
*
req
,
struct
ecx
*
ecx
,
enum
vdp_action
act
,
const
void
*
ptr
,
ssize_t
len
)
{
req
->
acct
.
resp_bodybytes
+=
len
;
(
void
)
req
;
if
(
act
==
VDP_END
)
act
=
VDP_FLUSH
;
return
(
VDP_bytes
(
ecx
->
preq
,
act
,
ptr
,
len
));
...
...
@@ -871,5 +871,5 @@ ved_deliver(struct req *req, struct boc *boc, int wantbody)
if
(
i
&&
req
->
doclose
==
SC_NULL
)
req
->
doclose
=
SC_REM_CLOSE
;
(
void
)
VDP_Close
(
req
);
req
->
acct
.
resp_bodybytes
+=
VDP_Close
(
req
);
}
bin/varnishtest/tests/e00000.vtc
View file @
f087fe6d
...
...
@@ -32,3 +32,4 @@ client c1 {
client c1 -run
logexpect l1 -wait
varnish v1 -expect esi_errors == 0
varnish v1 -expect MAIN.s_resp_bodybytes == 33
bin/varnishtest/tests/e00001.vtc
View file @
f087fe6d
...
...
@@ -38,3 +38,4 @@ client c1 {
client c1 -run
logexpect l1 -wait
varnish v1 -expect esi_errors == 2
varnish v1 -expect MAIN.s_resp_bodybytes == 40
bin/varnishtest/tests/e00002.vtc
View file @
f087fe6d
...
...
@@ -27,3 +27,4 @@ client c1 {
client c1 -run
varnish v1 -expect esi_errors == 0
varnish v1 -expect MAIN.s_resp_bodybytes == 35
bin/varnishtest/tests/e00003.vtc
View file @
f087fe6d
...
...
@@ -84,6 +84,7 @@ client c1 {
client c1 -run
varnish v1 -expect esi_errors == 0
varnish v1 -expect MAIN.s_resp_bodybytes == 150
logexpect l1 -wait
logexpect l2 -wait
...
...
bin/varnishtest/tests/e00004.vtc
View file @
f087fe6d
...
...
@@ -33,3 +33,4 @@ client c1 {
client c1 -run
varnish v1 -expect esi_errors == 0
varnish v1 -expect MAIN.s_resp_bodybytes == 67
bin/varnishtest/tests/e00005.vtc
View file @
f087fe6d
...
...
@@ -34,3 +34,4 @@ client c1 {
client c1 -run
varnish v1 -expect esi_errors == 0
varnish v1 -expect MAIN.s_resp_bodybytes == 67
bin/varnishtest/tests/e00006.vtc
View file @
f087fe6d
...
...
@@ -43,6 +43,7 @@ client c1 {
client c1 -run
varnish v1 -expect esi_errors == 0
varnish v1 -expect MAIN.s_resp_bodybytes == 78
# Now try with invalid URLs
...
...
@@ -78,14 +79,19 @@ client c1 {
rxresp
expect resp.status == 200
expect resp.bodylen == 4
} -run
varnish v1 -expect esi_errors == 1
varnish v1 -expect MAIN.s_resp_bodybytes == 82
client c1 {
txreq -url /https
rxresp
expect resp.status == 200
expect resp.bodylen == 6
}
client c1 -run
} -run
logexpect l1 -wait
varnish v1 -expect esi_errors == 2
varnish v1 -expect MAIN.s_resp_bodybytes == 88
bin/varnishtest/tests/e00007.vtc
View file @
f087fe6d
...
...
@@ -48,3 +48,4 @@ client c1 {
client c1 -run
varnish v1 -expect esi_errors == 0
varnish v1 -expect MAIN.s_resp_bodybytes == 120
bin/varnishtest/tests/e00008.vtc
View file @
f087fe6d
...
...
@@ -114,3 +114,4 @@ logexpect l1 -wait
logexpect l2 -wait
logexpect l3 -wait
varnish v1 -expect esi_errors == 18
varnish v1 -expect MAIN.s_resp_bodybytes == 472
...
...
bin/varnishtest/tests/e00009.vtc
View file @
f087fe6d
...
...
@@ -35,6 +35,7 @@ client c1 {
} -run
logexpect l1 -wait
varnish v1 -expect MAIN.s_resp_bodybytes == 57
varnish v1 -cli "param.set feature +esi_disable_xml_check"
...
...
@@ -46,3 +47,4 @@ client c1 {
expect resp.http.transfer-encoding == "chunked"
} -run
varnish v1 -expect esi_errors == 0
varnish v1 -expect MAIN.s_resp_bodybytes == 79
bin/varnishtest/tests/e00012.vtc
View file @
f087fe6d
...
...
@@ -32,6 +32,8 @@ client c1 {
expect resp.http.Transfer-Encoding == "chunked"
} -run
varnish v1 -expect MAIN.s_resp_bodybytes == 67
client c1 {
txreq -url /foo/bar -proto HTTP/1.0
rxresp
...
...
@@ -43,3 +45,4 @@ client c1 {
} -run
varnish v1 -expect esi_errors == 0
varnish v1 -expect MAIN.s_resp_bodybytes == 134
bin/varnishtest/tests/e00015.vtc
View file @
f087fe6d
...
...
@@ -48,6 +48,7 @@ client c1 {
varnish v1 -vsl_catchup
varnish v1 -expect esi_errors == 0
varnish v1 -expect MAIN.s_resp_bodybytes == 149
server s1 {
rxreq
...
...
@@ -131,6 +132,8 @@ client c1 {
txreq -url /top2 -hdr "fiddle: do_esi"
rxresp
expect resp.status == 503
expect resp.bodylen == 251
} -run
varnish v1 -expect esi_errors == 0
varnish v1 -expect MAIN.s_resp_bodybytes == 865
bin/varnishtest/tests/e00016.vtc
View file @
f087fe6d
...
...
@@ -50,3 +50,4 @@ client c1 {
client c1 -run
varnish v1 -expect esi_errors == 0
varnish v1 -expect MAIN.s_resp_bodybytes == 105
bin/varnishtest/tests/e00017.vtc
View file @
f087fe6d
...
...
@@ -86,3 +86,4 @@ client c1 {
client c1 -run
varnish v1 -expect esi_errors == 0
varnish v1 -expect MAIN.s_resp_bodybytes == 684
bin/varnishtest/tests/e00019.vtc
View file @
f087fe6d
...
...
@@ -77,3 +77,4 @@ logexpect l1 -wait
varnish v1 -expect esi_errors == 5
varnish v1 -expect esi_warnings == 1
varnish v1 -expect MAIN.s_resp_bodybytes == 65856
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment