r2177 - trunk/varnish-cache/bin/varnishd
phk at projects.linpro.no
phk at projects.linpro.no
Mon Oct 29 08:53:28 CET 2007
Author: phk
Date: 2007-10-29 08:53:27 +0100 (Mon, 29 Oct 2007)
New Revision: 2177
Modified:
trunk/varnish-cache/bin/varnishd/cache_vrt_esi.c
Log:
Issue an VCL_error if 'esi' is not used from vcl_fetch.
Modified: trunk/varnish-cache/bin/varnishd/cache_vrt_esi.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_vrt_esi.c 2007-10-29 07:53:01 UTC (rev 2176)
+++ trunk/varnish-cache/bin/varnishd/cache_vrt_esi.c 2007-10-29 07:53:27 UTC (rev 2177)
@@ -533,6 +533,13 @@
int i;
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
+ if (sp->cur_method != VCL_MET_FETCH) {
+ /* XXX: we should catch this at compile time */
+ WSP(sp, SLT_VCL_error,
+ "esi can only be called from vcl_fetch", "");
+ return;
+ }
+
CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC);
/* XXX: only if GET ? */
More information about the varnish-commit
mailing list