[master] 0f28caf Dont lie about being in inside vcl_backend_fetch{} when we're not.

Poul-Henning Kamp phk at FreeBSD.org
Tue May 1 09:45:27 UTC 2018


commit 0f28cafa6fb2f5b2190af9d57abd2b540ef909b2
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Tue May 1 07:12:18 2018 +0000

    Dont lie about being in inside vcl_backend_fetch{} when we're not.

diff --git a/bin/varnishd/cache/cache_director.c b/bin/varnishd/cache/cache_director.c
index e97c174..2c4012e 100644
--- a/bin/varnishd/cache/cache_director.c
+++ b/bin/varnishd/cache/cache_director.c
@@ -96,7 +96,7 @@ vdi_resolve(struct busyobj *bo)
 	ctx.sp = bo->sp;
 	ctx.now = bo->t_prev;
 	ctx.ws = bo->ws;
-	ctx.method = VCL_MET_BACKEND_FETCH;	// XXX: Not quite true
+	ctx.method = 0;
 
 	for (d = bo->director_req; d != NULL &&
 	    d->methods->resolve != NULL; d = d2) {
diff --git a/lib/libvmod_directors/vmod_shard.c b/lib/libvmod_directors/vmod_shard.c
index a470c6e..0eabffa 100644
--- a/lib/libvmod_directors/vmod_shard.c
+++ b/lib/libvmod_directors/vmod_shard.c
@@ -879,7 +879,7 @@ vmod_shard_param_read(VRT_CTX, const void *id,
 	CHECK_OBJ_NOTNULL(p, VMOD_SHARD_SHARD_PARAM_MAGIC);
 	(void) who; // XXX
 
-	if (ctx->method & VCL_MET_TASK_B)
+	if (ctx->method == 0 || (ctx->method & VCL_MET_TASK_B))
 		p = shard_param_task(ctx, id, p);
 
 	if (p == NULL)


More information about the varnish-commit mailing list