Commit edf2a349 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp Committed by Lasse Karstensen

Enforce that req.body caching can only be done on the first

tour through vcl_recv{}
parent e5ba8e76
......@@ -199,6 +199,14 @@ VRB_Cache(struct req *req, ssize_t maxsize)
CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
/*
* We only allow caching to happen the first time through vcl_recv{}
* where we know we will have no competition or conflicts for the
* updates to req.http.* etc.
*/
if (req->restarts > 0 && req->req_body_status != REQ_BODY_CACHED)
return (-1);
assert (req->req_step == R_STP_RECV);
switch(req->req_body_status) {
case REQ_BODY_CACHED:
......
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