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

We always want to go through vcl_fetch(), even on error 503


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2070 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 62f4b0cd
...@@ -304,39 +304,35 @@ cnt_fetch(struct sess *sp) ...@@ -304,39 +304,35 @@ cnt_fetch(struct sess *sp)
VBE_free_bereq(sp->bereq); VBE_free_bereq(sp->bereq);
sp->bereq = NULL; sp->bereq = NULL;
if (0 && i) { if (!i)
SYN_ErrorPage(sp, 503, "Error talking to backend", 30); RFC2616_cache_policy(sp, &sp->obj->http); /* XXX -> VCL */
} else { else
if (!i) http_PutStatus(sp->wrk, sp->fd, &sp->obj->http, 503);
RFC2616_cache_policy(sp, &sp->obj->http); /* XXX -> VCL */
else VCL_fetch_method(sp);
sp->obj->http.status = 503;
switch (sp->handling) {
VCL_fetch_method(sp); case VCL_RET_ERROR:
case VCL_RET_RESTART:
switch (sp->handling) { sp->obj->ttl = 0;
case VCL_RET_ERROR: sp->obj->cacheable = 0;
case VCL_RET_RESTART: HSH_Unbusy(sp->obj);
sp->obj->ttl = 0; HSH_Deref(sp->obj);
sp->obj->cacheable = 0; sp->obj = NULL;
HSH_Unbusy(sp->obj); if (sp->handling == VCL_RET_ERROR)
HSH_Deref(sp->obj); sp->step = STP_ERROR;
sp->obj = NULL; else {
if (sp->handling == VCL_RET_ERROR) sp->restarts++;
sp->step = STP_ERROR; sp->step = STP_RECV;
else {
sp->restarts++;
sp->step = STP_RECV;
}
return (0);
case VCL_RET_PASS:
sp->obj->pass = 1;
break;
case VCL_RET_INSERT:
break;
default:
INCOMPL();
} }
return (0);
case VCL_RET_PASS:
sp->obj->pass = 1;
break;
case VCL_RET_INSERT:
break;
default:
INCOMPL();
} }
sp->obj->cacheable = 1; sp->obj->cacheable = 1;
......
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