[master] eb7004aa9 Fodder for #3844 discussion

Nils Goroll nils.goroll at uplex.de
Mon Sep 12 17:44:06 UTC 2022


commit eb7004aa90c6a000dfe08ea15d8a6f28bb263b63
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Mon Sep 12 19:40:20 2022 +0200

    Fodder for #3844 discussion

diff --git a/bin/varnishtest/tests/v00020.vtc b/bin/varnishtest/tests/v00020.vtc
index 96c318c57..848c7252e 100644
--- a/bin/varnishtest/tests/v00020.vtc
+++ b/bin/varnishtest/tests/v00020.vtc
@@ -480,6 +480,13 @@ varnish v1 -vcl+backend {
 		    (resp.http.foo + resp.http.bar) == ("X" + resp.http.foo);
 		// Ticket 2809
 		set resp.http.bar = true == false;
+
+		set resp.http.a = req.http.inexistent;
+		// correct? #3844
+		set resp.http.a-eq-inexistent = resp.http.a == req.http.inexistent;
+		// discussion in #3844 - and should !!hdr work?
+		set resp.http.is-a = !(!resp.http.a);
+		set resp.http.is-inexistent = !(!req.http.inexistent);
 	}
 	sub vcl_deliver {
 		set resp.http.p = (0 + 999999999999999);
@@ -499,6 +506,13 @@ client c1 {
 	expect resp.http.p == 999999999999999
 	expect resp.http.n == -999999999999999
 	expect resp.http.o == 200
+
+	expect resp.http.a == ""
+	# correct? #3844
+	expect resp.http.a-eq-inexistent == "false"
+	# discussion in #3844
+	expect resp.http.is-a == "true"
+	expect resp.http.is-inexistent == "false"
 } -run
 
 varnish v1 -vcl {


More information about the varnish-commit mailing list