diff --git a/bin/varnishd/cache/cache_req_fsm.c b/bin/varnishd/cache/cache_req_fsm.c index 313440dae6a..607989c9e7d 100644 --- a/bin/varnishd/cache/cache_req_fsm.c +++ b/bin/varnishd/cache/cache_req_fsm.c @@ -235,7 +235,8 @@ cnt_deliver(struct worker *wrk, struct req *req) VCL_deliver_method(req->vcl, wrk, req, NULL, NULL); if (FEATURE(FEATURE_VALIDATE_CLIENT_RESPONSES) && - wrk->vpi->handling == VCL_RET_DELIVER && HTTP_ValidateResp(req->resp)) { + req->esi_level == 0 && wrk->vpi->handling == VCL_RET_DELIVER && + HTTP_ValidateResp(req->resp)) { VSLb(req->vsl, SLT_VCL_Error, "Response failed HTTP validation"); wrk->vpi->handling = VCL_RET_FAIL; @@ -338,7 +339,8 @@ cnt_synth(struct worker *wrk, struct req *req) AZ(VSB_finish(synth_body)); if (FEATURE(FEATURE_VALIDATE_CLIENT_RESPONSES) && - wrk->vpi->handling == VCL_RET_DELIVER && HTTP_ValidateResp(req->resp)) { + req->esi_level == 0 && wrk->vpi->handling == VCL_RET_DELIVER && + HTTP_ValidateResp(req->resp)) { VSLb(req->vsl, SLT_VCL_Error, "Synthetic response failed HTTP validation"); wrk->vpi->handling = VCL_RET_FAIL;