git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1808
d4fa192b-c00b-0410-8231-
f00ffab90ce4
sp->t_resp = TIM_real();
RES_BuildHttp(sp);
VCL_deliver_method(sp);
- if (sp->handling != VCL_RET_DELIVER)
+ switch (sp->handling) {
+ case VCL_RET_DELIVER:
+ break;
+ case VCL_RET_ERROR:
+ HSH_Deref(sp->obj);
+ sp->obj = NULL;
+ sp->step = STP_ERROR;
+ return (0);
+ default:
INCOMPL();
+ }
RES_WriteObj(sp);
HSH_Deref(sp->obj);
VCL_fetch_method(sp);
- if (sp->handling == VCL_RET_ERROR)
- INCOMPL();
-
- if (sp->handling == VCL_RET_PASS)
+ switch (sp->handling) {
+ case VCL_RET_ERROR:
+ sp->obj->ttl = 0;
+ sp->obj->cacheable = 0;
+ HSH_Unbusy(sp->obj);
+ HSH_Deref(sp->obj);
+ sp->obj = NULL;
+ sp->step = STP_ERROR;
+ return (0);
+ case VCL_RET_PASS:
sp->obj->pass = 1;
+ break;
+ case VCL_RET_INSERT:
+ break;
+ default:
+ INCOMPL();
+ }
}
sp->obj->cacheable = 1;