[4.0] 41db0bc Don't expose certain variables in vcl_pipe
Federico G. Schwindt
fgsch at lodoss.net
Thu Mar 13 10:24:30 CET 2014
commit 41db0bc0b31b46cea33e6d93f598fa210eeb343d
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date: Thu Mar 6 15:36:54 2014 +0000
Don't expose certain variables in vcl_pipe
Accessing bereq.first_byte_timeout and bereq.between_bytes_timeout
in vcl_pipe makes no sense so disallow it.
Fixes: #1435
diff --git a/bin/varnishtest/tests/v00016.vtc b/bin/varnishtest/tests/v00016.vtc
index b23d21e..4314dce 100644
--- a/bin/varnishtest/tests/v00016.vtc
+++ b/bin/varnishtest/tests/v00016.vtc
@@ -104,3 +104,17 @@ varnish v1 -errvcl {Object not found: 'foo.bar'} {
new bar = foo.bar();
}
}
+
+varnish v1 -errvcl {'bereq.first_byte_timeout': cannot be set} {
+ backend b { .host = "127.0.0.1"; }
+ sub vcl_pipe {
+ set bereq.first_byte_timeout = 10s;
+ }
+}
+
+varnish v1 -errvcl {'bereq.between_bytes_timeout': cannot be set} {
+ backend b { .host = "127.0.0.1"; }
+ sub vcl_pipe {
+ set bereq.between_bytes_timeout = 10s;
+ }
+}
diff --git a/lib/libvcc/generate.py b/lib/libvcc/generate.py
index f313bd5..8c9461a 100755
--- a/lib/libvcc/generate.py
+++ b/lib/libvcc/generate.py
@@ -351,16 +351,16 @@ The client's IP address.
),
('bereq.first_byte_timeout',
'DURATION',
- ( 'pipe', 'backend', ),
- ( 'pipe', 'backend', ), """
+ ( 'backend', ),
+ ( 'backend', ), """
The time in seconds to wait for the first byte from
the backend. Not available in pipe mode.
"""
),
('bereq.between_bytes_timeout',
'DURATION',
- ( 'pipe', 'backend', ),
- ( 'pipe', 'backend', ), """
+ ( 'backend', ),
+ ( 'backend', ), """
The time in seconds to wait between each received byte from the
backend. Not available in pipe mode.
"""
More information about the varnish-commit
mailing list