[master] e18a6ab Formally remove error from vcl_deliver VCC

Kristian Lyngstøl kristian at varnish-cache.org
Mon Oct 17 14:57:59 CEST 2011


commit e18a6ab53fbae30b633fbe5f040b5686bec6ea4d
Author: Kristian Lyngstol <kristian at bohemians.org>
Date:   Mon Oct 17 14:46:54 2011 +0200

    Formally remove error from vcl_deliver VCC
    
    Note that error wasn't actually working in vcl_deliver, and this just puts
    VCC in line with the rest of Varnish. Syntax errors are better than assert
    errors.
    
    Re #1027
    
    I'll leave it for later discussion to see if we close #1027, which is
    technically a feature request now, though a request for a feature we used
    to have (not sure how well it worked).

diff --git a/bin/varnishtest/tests/r01027.vtc b/bin/varnishtest/tests/r01027.vtc
new file mode 100644
index 0000000..6c20b00
--- /dev/null
+++ b/bin/varnishtest/tests/r01027.vtc
@@ -0,0 +1,8 @@
+varnishtest "Test if you can error in vcl_deliver"
+
+varnish v1 -badvcl {
+	sub vcl_deliver {
+		error 201 "ok";
+	}
+}
+
diff --git a/lib/libvcl/vcc_action.c b/lib/libvcl/vcc_action.c
index 9d72b51..044d12d 100644
--- a/lib/libvcl/vcc_action.c
+++ b/lib/libvcl/vcc_action.c
@@ -320,7 +320,7 @@ static struct action_table {
 } action_table[] = {
 	{ "error",		parse_error,
 	    VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH |
-            VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER
+            VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH
 	},
 
 #define VCL_RET_MAC(l, U, B)						\



More information about the varnish-commit mailing list