Commit 3f4a5a1b authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Don't panic if return(pass(DURATION)) is used on client side. Ignore

the argument with a VSL message.

Fixes:	#2299
parent 06c83b96
......@@ -91,6 +91,11 @@ VRT_hit_for_pass(VRT_CTX, VCL_DURATION d)
struct objcore *oc;
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
if (ctx->bo == NULL) {
VSLb(ctx->vsl, SLT_Error,
"Note: Ignoring DURATION argument to return(pass);");
return;
}
CHECK_OBJ_NOTNULL(ctx->bo, BUSYOBJ_MAGIC);
oc = ctx->bo->fetch_objcore;
oc->ttl = d;
......
......@@ -17,7 +17,7 @@ varnish v1 -vcl+backend {
if (req.url == "/foo") {
return(hash);
} else {
return(pass);
return(pass(10m));
}
}
sub vcl_hit {
......
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