Commit 8f453990 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Issue an VCL_error if 'esi' is not used from vcl_fetch.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2177 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 8642d91c
......@@ -533,6 +533,13 @@ VRT_ESI(struct sess *sp)
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 ? */
......
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