r4187 - trunk/varnish-cache/bin/varnishtest/tests
phk at projects.linpro.no
phk at projects.linpro.no
Mon Aug 17 14:44:03 CEST 2009
Author: phk
Date: 2009-08-17 14:44:03 +0200 (Mon, 17 Aug 2009)
New Revision: 4187
Added:
trunk/varnish-cache/bin/varnishtest/tests/v00024.vtc
Log:
New test for string comparisons.
Added: trunk/varnish-cache/bin/varnishtest/tests/v00024.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/v00024.vtc (rev 0)
+++ trunk/varnish-cache/bin/varnishtest/tests/v00024.vtc 2009-08-17 12:44:03 UTC (rev 4187)
@@ -0,0 +1,27 @@
+# $Id$
+
+test "Test that headers can be compared"
+
+server s1 {
+ rxreq
+ expect req.url == "/foo"
+ txresp -status 200 -body "1"
+} -start
+
+varnish v1 -vcl+backend {
+ sub vcl_recv {
+ if (req.http.etag == req.http.if-none-match) {
+ error 400 "FOO";
+ }
+ }
+} -start
+
+client c1 {
+ txreq -url "/foo"
+ rxresp
+ expect resp.status == 200
+ expect resp.bodylen == 1
+ txreq -url "/foo" -hdr "etag: foo" -hdr "if-none-match: foo"
+ rxresp
+ expect resp.status == 400
+} -run
More information about the varnish-commit
mailing list