Commit 8bfe8e0d authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Fix the last oc->oh tests to look at OC_F_PRIVATE instead

parent d15d4a47
......@@ -168,7 +168,7 @@ VBO_DerefBusyObj(struct worker *wrk, struct busyobj **pbo)
*pbo = NULL;
CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC);
CHECK_OBJ_ORNULL(bo->fetch_obj, OBJECT_MAGIC);
if (bo->fetch_obj != NULL && bo->fetch_obj->objcore->objhead != NULL) {
if (bo->fetch_obj != NULL) {
oc = bo->fetch_obj->objcore;
CHECK_OBJ_NOTNULL(oc, OBJCORE_MAGIC);
CHECK_OBJ_NOTNULL(oc->objhead, OBJHEAD_MAGIC);
......
......@@ -197,8 +197,8 @@ vbf_stp_fetchhdr(struct worker *wrk, struct busyobj *bo)
bo->exp.entered = W_TIM_real(wrk);
RFC2616_Ttl(bo);
/* pass from vclrecv{} has negative TTL */
if (bo->fetch_objcore->objhead == NULL)
/* private objects have negative TTL */
if (bo->fetch_objcore->flags & OC_F_PRIVATE)
bo->exp.ttl = -1.;
AZ(bo->do_esi);
......@@ -299,7 +299,7 @@ vbf_stp_fetch(struct worker *wrk, struct busyobj *bo)
else if (bo->is_gzip)
bo->vfp = &vfp_testgzip;
if (bo->fetch_objcore->objhead == NULL)
if (bo->fetch_objcore->flags & OC_F_PRIVATE)
AN(bo->uncacheable);
/* No reason to try streaming a non-existing body */
......@@ -310,7 +310,7 @@ vbf_stp_fetch(struct worker *wrk, struct busyobj *bo)
bo->uncacheable ? HTTPH_R_PASS : HTTPH_A_INS, &nhttp);
/* Create Vary instructions */
if (bo->fetch_objcore->objhead != NULL) {
if (!(bo->fetch_objcore->flags & OC_F_PRIVATE)) {
varyl = VRY_Create(bo, &vary);
if (varyl > 0) {
AN(vary);
......@@ -423,6 +423,7 @@ vbf_stp_fetch(struct worker *wrk, struct busyobj *bo)
VBO_setstate(bo, BOS_FETCHING);
V1F_fetch_body(wrk, bo);
HSH_Complete(obj->objcore);
assert(bo->refcount >= 1);
......
......@@ -447,7 +447,5 @@ V1F_fetch_body(struct worker *wrk, struct busyobj *bo)
"Content-Length: %zd", obj->len);
}
}
if (obj->objcore->objhead != NULL)
HSH_Complete(obj->objcore);
bo->stats = NULL;
}
......@@ -206,7 +206,7 @@ cnt_deliver(struct worker *wrk, struct req *req)
}
req->t_resp = W_TIM_real(wrk);
if (req->obj->objcore->objhead != NULL) {
if (!(req->obj->objcore->flags & OC_F_PRIVATE)) {
if ((req->t_resp - req->obj->last_lru) >
cache_param->lru_timeout &&
EXP_Touch(req->obj->objcore))
......
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