[experimental-ims] b33efe4 Allow 'storage' in backend identifiers.

Dag Haavi Finstad daghf at varnish-software.com
Thu Dec 18 10:27:51 CET 2014


commit b33efe4cbe2ee8b69222d7f53bd3833938542390
Author: Dag Haavi Finstad <daghf at varnish-software.com>
Date:   Tue Jul 17 14:58:05 2012 +0200

    Allow 'storage' in backend identifiers.
    
    Fixes: #1164

diff --git a/bin/varnishtest/tests/r01164.vtc b/bin/varnishtest/tests/r01164.vtc
new file mode 100644
index 0000000..43c0996
--- /dev/null
+++ b/bin/varnishtest/tests/r01164.vtc
@@ -0,0 +1,23 @@
+varnishtest "Regression test for #1163: allow backends to be named storage*"
+
+varnish v1 -vcl {
+	backend storage_foo {
+		.host = "127.0.0.1";
+	}
+
+	sub vcl_recv {
+		set req.backend = storage_foo;
+	}	    
+}
+
+varnish v1 -vcl {
+	backend storagefoo {
+		.host = "127.0.0.1";
+	}
+
+	sub vcl_recv {
+		set req.backend = storagefoo;
+	}	
+}
+
+
diff --git a/lib/libvcl/vcc_compile.c b/lib/libvcl/vcc_compile.c
index 30f2a24..318c1b9 100644
--- a/lib/libvcl/vcc_compile.c
+++ b/lib/libvcl/vcc_compile.c
@@ -599,7 +599,7 @@ vcc_CompileSource(const struct vcc *tl0, struct vsb *sb, struct source *sp)
 		sym->r_methods = v->r_methods;
 	}
 
-	sym = VCC_AddSymbolStr(tl, "storage", SYM_WILDCARD);
+	sym = VCC_AddSymbolStr(tl, "storage.", SYM_WILDCARD);
 	sym->wildcard = vcc_Stv_Wildcard;
 
 	vcl_output_lang_h(tl->fh);



More information about the varnish-commit mailing list