[3.0] 6d26305 Formally remove error from vcl_deliver VCC
Tollef Fog Heen
tfheen at varnish-cache.org
Wed Oct 26 14:58:58 CEST 2011
commit 6d263051a9ea9bd624401610867f0bd0d006b646
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 353a40b..033149b 100644
--- a/lib/libvcl/vcc_action.c
+++ b/lib/libvcl/vcc_action.c
@@ -327,7 +327,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