[master] 455d4a7a6 v68.vtc: Test that the previous scenario also works wrt TE: chunked
Nils Goroll
nils.goroll at uplex.de
Thu Feb 6 19:14:06 UTC 2025
commit 455d4a7a6e050a5db261f426ccc8503989fdbb5b
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Thu Feb 6 19:54:23 2025 +0100
v68.vtc: Test that the previous scenario also works wrt TE: chunked
diff --git a/bin/varnishtest/tests/v00068.vtc b/bin/varnishtest/tests/v00068.vtc
index 07e77b6f5..2ccf30afe 100644
--- a/bin/varnishtest/tests/v00068.vtc
+++ b/bin/varnishtest/tests/v00068.vtc
@@ -5,24 +5,42 @@ server s1 {
expect req.method == "GET"
expect req.url == "/cached"
expect req.http.Content-Length == <undef>
+ expect req.http.Transfer-Encoding == <undef>
txresp
rxreq
expect req.method == "GET"
expect req.url == "/cachednobody"
expect req.http.Content-Length == <undef>
+ expect req.http.Transfer-Encoding == <undef>
txresp
rxreq
expect req.method == "HEAD"
expect req.url == "/head-restart-get"
expect req.http.Content-Length == <undef>
+ expect req.http.Transfer-Encoding == <undef>
txresp
rxreq
expect req.method == "GET"
expect req.url == "/head-restart-get"
expect req.http.Content-Length == <undef>
+ expect req.http.Transfer-Encoding == <undef>
+ txresp
+
+ rxreq
+ expect req.method == "HEAD"
+ expect req.url == "/head-restart-get-chunked"
+ expect req.http.Content-Length == <undef>
+ expect req.http.Transfer-Encoding == <undef>
+ txresp
+
+ rxreq
+ expect req.method == "GET"
+ expect req.url == "/head-restart-get-chunked"
+ expect req.http.Content-Length == <undef>
+ expect req.http.Transfer-Encoding == <undef>
txresp
} -start
@@ -41,13 +59,13 @@ varnish v1 -vcl+backend {
}
sub vcl_deliver {
- if (req.url == "/head-restart-get" && req.restarts == 0) {
+ if (req.url ~ "^/head-restart-get" && req.restarts == 0) {
return (restart);
}
}
sub vcl_backend_fetch {
- if (bereq.url == "/head-restart-get" && bereq.http.restarts == "0") {
+ if (bereq.url ~ "^/head-restart-get" && bereq.http.restarts == "0") {
set bereq.method = "HEAD";
}
@@ -70,4 +88,10 @@ client c1 {
txreq -url "/head-restart-get" -body "fine"
rxresp
expect resp.status == 200
+
+ txreq -url "/head-restart-get-chunked" -hdr "Transfer-encoding: chunked"
+ chunkedlen 10
+ chunkedlen 0
+ rxresp
+ expect resp.status == 200
} -run
More information about the varnish-commit
mailing list