Commit c082835a authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Drop the body of hit-for-pass objects once we have delivered them to

the original requester.

Submitted by:	DocWilco
parent 195b6017
......@@ -327,6 +327,7 @@ cnt_deliver(struct sess *sp, struct worker *wrk, struct req *req)
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
CHECK_OBJ_NOTNULL(req->obj, OBJECT_MAGIC);
AZ(req->busyobj);
req->director = NULL;
......@@ -334,6 +335,13 @@ cnt_deliver(struct sess *sp, struct worker *wrk, struct req *req)
RES_WriteObj(sp);
/* No point in saving the body if it is hit-for-pass */
if (req->obj->objcore != NULL) {
CHECK_OBJ_NOTNULL(req->obj->objcore, OBJCORE_MAGIC);
if (req->obj->objcore->flags & OC_F_PASS)
STV_Freestore(req->obj);
}
assert(WRW_IsReleased(wrk));
(void)HSH_Deref(&wrk->stats, NULL, &req->obj);
http_Teardown(req->resp);
......
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