r2070 - trunk/varnish-cache/bin/varnishd
phk at projects.linpro.no
phk at projects.linpro.no
Mon Oct 1 09:21:27 CEST 2007
Author: phk
Date: 2007-10-01 09:21:26 +0200 (Mon, 01 Oct 2007)
New Revision: 2070
Modified:
trunk/varnish-cache/bin/varnishd/cache_center.c
Log:
We always want to go through vcl_fetch(), even on error 503
Modified: trunk/varnish-cache/bin/varnishd/cache_center.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_center.c 2007-09-30 21:27:16 UTC (rev 2069)
+++ trunk/varnish-cache/bin/varnishd/cache_center.c 2007-10-01 07:21:26 UTC (rev 2070)
@@ -304,39 +304,35 @@
VBE_free_bereq(sp->bereq);
sp->bereq = NULL;
- if (0 && i) {
- SYN_ErrorPage(sp, 503, "Error talking to backend", 30);
- } else {
- if (!i)
- RFC2616_cache_policy(sp, &sp->obj->http); /* XXX -> VCL */
- else
- sp->obj->http.status = 503;
+ if (!i)
+ RFC2616_cache_policy(sp, &sp->obj->http); /* XXX -> VCL */
+ else
+ http_PutStatus(sp->wrk, sp->fd, &sp->obj->http, 503);
- VCL_fetch_method(sp);
+ VCL_fetch_method(sp);
- switch (sp->handling) {
- case VCL_RET_ERROR:
- case VCL_RET_RESTART:
- sp->obj->ttl = 0;
- sp->obj->cacheable = 0;
- HSH_Unbusy(sp->obj);
- HSH_Deref(sp->obj);
- sp->obj = NULL;
- if (sp->handling == VCL_RET_ERROR)
- sp->step = STP_ERROR;
- 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();
+ switch (sp->handling) {
+ case VCL_RET_ERROR:
+ case VCL_RET_RESTART:
+ sp->obj->ttl = 0;
+ sp->obj->cacheable = 0;
+ HSH_Unbusy(sp->obj);
+ HSH_Deref(sp->obj);
+ sp->obj = NULL;
+ if (sp->handling == VCL_RET_ERROR)
+ sp->step = STP_ERROR;
+ 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();
}
sp->obj->cacheable = 1;
More information about the varnish-commit
mailing list