Commit 0302e16e authored by Nils Goroll's avatar Nils Goroll

Expire superseded objects also if they are no IMS/INM candidates

parent 99cc7a7c
......@@ -192,7 +192,8 @@ vbf_stp_mkbereq(const struct worker *wrk, struct busyobj *bo)
http_CopyHome(bo->bereq0);
}
if (bo->ims_oc != NULL) {
if (bo->ims_oc != NULL &&
ObjCheckFlag(bo->wrk, bo->ims_oc, OF_IMSCAND)) {
q = HTTP_GetHdrPack(bo->wrk, bo->ims_oc, H_Last_Modified);
if (q != NULL)
http_PrintfHeader(bo->bereq0,
......@@ -974,7 +975,7 @@ VBF_Fetch(struct worker *wrk, struct req *req, struct objcore *oc,
bo->fetch_objcore = oc;
AZ(bo->ims_oc);
if (oldoc != NULL && ObjCheckFlag(req->wrk, oldoc, OF_IMSCAND)) {
if (oldoc != NULL) {
assert(oldoc->refcnt > 0);
HSH_Ref(oldoc);
bo->ims_oc = oldoc;
......
......@@ -22,7 +22,11 @@ client c1 {
expect resp.bodylen == 3
delay 1
} -run
varnish v1 -expect n_object == 1
client c1 {
# We still get old object
txreq
rxresp
......@@ -37,3 +41,6 @@ client c1 {
rxresp
expect resp.bodylen == 6
} -run
# and the old one has got superseded
varnish v1 -expect n_object == 1
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