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
86c57392
Commit
86c57392
authored
Nov 24, 2015
by
Poul-Henning Kamp
Committed by
Lasse Karstensen
Jan 13, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Always slim private & pass objects after delivery.
Fixes: #1821
parent
e76461b7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
5 deletions
+34
-5
cache_req_fsm.c
bin/varnishd/cache/cache_req_fsm.c
+6
-5
r01821.vtc
bin/varnishtest/tests/r01821.vtc
+28
-0
No files found.
bin/varnishd/cache/cache_req_fsm.c
View file @
86c57392
...
...
@@ -209,19 +209,20 @@ cnt_deliver(struct worker *wrk, struct req *req)
cnt_vdp
(
req
,
bo
);
if
(
bo
!=
NULL
)
VBO_DerefBusyObj
(
wrk
,
&
bo
);
VSLb_ts_req
(
req
,
"Resp"
,
W_TIM_real
(
wrk
));
if
(
http_HdrIs
(
req
->
resp
,
H_Connection
,
"close"
))
req
->
doclose
=
SC_RESP_CLOSE
;
if
((
req
->
objcore
->
flags
&
OC_F_PASS
)
&&
bo
!=
NULL
)
{
VBO_waitstate
(
bo
,
BOS_FINISHED
);
if
(
req
->
objcore
->
flags
&
(
OC_F_PRIVATE
|
OC_F_PASS
))
{
if
(
bo
!=
NULL
)
VBO_waitstate
(
bo
,
BOS_FINISHED
);
ObjSlim
(
wrk
,
req
->
objcore
);
}
if
(
bo
!=
NULL
)
VBO_DerefBusyObj
(
wrk
,
&
bo
);
(
void
)
HSH_DerefObjCore
(
wrk
,
&
req
->
objcore
);
http_Teardown
(
req
->
resp
);
return
(
REQ_FSM_DONE
);
...
...
bin/varnishtest/tests/r01821.vtc
0 → 100644
View file @
86c57392
varnishtest "Slim down hit-for-pass objects"
server s1 -repeat 2 {
rxreq
txresp -hdr "Cache-Control: max-age=5" -bodylen 65535
} -start
varnish v1 -vcl+backend {
sub vcl_backend_response {
set beresp.uncacheable = true;
}
} -start
logexpect l1 -v v1 {
expect * * Storage Transient
} -start
client c1 {
txreq -url /foo
rxresp
txreq -url /bar
rxresp
} -run
logexpect l1 -wait
varnish v1 -expect SMA.Transient.c_bytes != 0
varnish v1 -expect SMA.Transient.g_bytes < 65536
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