[4.0] 60a4f5d Turn bereq.uncacheable read-only

Lasse Karstensen lkarsten at varnish-software.com
Thu Jan 15 16:35:41 CET 2015


commit 60a4f5d5ae07120ed3d0bacfb19b7a8e51a202f4
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date:   Mon Nov 10 11:41:12 2014 +0000

    Turn bereq.uncacheable read-only
    
    This had the same effect as writing to beresp.uncacheble.
    
    Conflicts:
    	bin/varnishd/cache/cache_vrt_var.c

diff --git a/bin/varnishd/cache/cache_vrt_var.c b/bin/varnishd/cache/cache_vrt_var.c
index 47897e1..7cfe163 100644
--- a/bin/varnishd/cache/cache_vrt_var.c
+++ b/bin/varnishd/cache/cache_vrt_var.c
@@ -173,20 +173,6 @@ VRT_r_beresp_##field(const struct vrt_ctx *ctx)				\
 
 /*--------------------------------------------------------------------*/
 
-void
-VRT_l_bereq_uncacheable(const struct vrt_ctx *ctx, unsigned a)
-{
-	CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
-	CHECK_OBJ_NOTNULL(ctx->bo, BUSYOBJ_MAGIC);
-
-	if (ctx->bo->do_pass && !a) {
-		VSLb(ctx->vsl, SLT_VCL_Error,
-		    "Ignoring attempt to reset bereq.uncacheable");
-	} else if (a) {
-		ctx->bo->do_pass = 1;
-	}
-}
-
 unsigned
 VRT_r_bereq_uncacheable(const struct vrt_ctx *ctx)
 {
diff --git a/bin/varnishtest/tests/v00025.vtc b/bin/varnishtest/tests/v00025.vtc
index c473a21..ffd622b 100644
--- a/bin/varnishtest/tests/v00025.vtc
+++ b/bin/varnishtest/tests/v00025.vtc
@@ -52,7 +52,6 @@ varnish v1 -arg "-i J.F.Nobody" -vcl+backend {
 	}
 
 	sub vcl_backend_fetch {
-		set bereq.uncacheable = false;
 		if (bereq.between_bytes_timeout < 10s) {
 			set bereq.http.quick = "please";
 		}
diff --git a/lib/libvcc/generate.py b/lib/libvcc/generate.py
index 4a7bdde..f9e1836 100755
--- a/lib/libvcc/generate.py
+++ b/lib/libvcc/generate.py
@@ -359,17 +359,10 @@ sp_variables = [
 	('bereq.uncacheable',
 		'BOOL',
 		( 'backend', ),
-		( 'backend_fetch', ), """
-		Indicates whether the object requested from the backend is
-		going to be uncacheable - either because the request was an
-		explicit pass from the client side or a hit on an uncacheable
-		("hit for pass") object.
-
-		Setting this variable in vcl_backend_fetch makes the object
-		uncacheable.
-
-		Clearing the variable has no effect and will log the warning
-		"Ignoring attempt to reset bereq.uncacheable".
+		( ), """
+		Indicates whether this request is uncacheable due
+		to a pass in the client side or a hit on an existing
+		uncacheable object (aka hit-for-pass).
 		"""
 	),
 	('bereq.connect_timeout',



More information about the varnish-commit mailing list