[6.0] 68d79ad4e Tighten an assert, and replicate it another place with similar constraints.
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Wed Oct 31 13:08:15 UTC 2018
commit 68d79ad4e0405360f2729ac6c7a3e4ae2305b363
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Wed Sep 5 18:07:06 2018 +0000
Tighten an assert, and replicate it another place with similar
constraints.
Related to: #2763
diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index 1c221aabf..0aaa2017f 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -196,7 +196,7 @@ vbf_stp_mkbereq(struct worker *wrk, struct busyobj *bo)
if (bo->stale_oc != NULL &&
ObjCheckFlag(bo->wrk, bo->stale_oc, OF_IMSCAND) &&
(bo->stale_oc->boc != NULL || ObjGetLen(wrk, bo->stale_oc) != 0)) {
- AZ(bo->stale_oc->flags & OC_F_PASS);
+ AZ(bo->stale_oc->flags & (OC_F_PASS|OC_F_PRIVATE));
q = HTTP_GetHdrPack(bo->wrk, bo->stale_oc, H_Last_Modified);
if (q != NULL)
http_PrintfHeader(bo->bereq0,
@@ -355,6 +355,7 @@ vbf_stp_startfetch(struct worker *wrk, struct busyobj *bo)
if (http_IsStatus(bo->beresp, 304)) {
if (bo->stale_oc != NULL &&
ObjCheckFlag(bo->wrk, bo->stale_oc, OF_IMSCAND)) {
+ AZ(bo->stale_oc->flags & (OC_F_PASS|OC_F_PRIVATE));
if (ObjCheckFlag(bo->wrk, bo->stale_oc, OF_CHGGZIP)) {
/*
* If we changed the gzip status of the object
More information about the varnish-commit
mailing list