[master] 3c04f5c71 Strip flags & final_flags when we switch to CONTINUATION headers.
Poul-Henning Kamp
phk at FreeBSD.org
Fri Mar 8 12:21:06 UTC 2019
commit 3c04f5c715a078cec448ffc14a48fec38596d4e7
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Fri Mar 8 12:19:30 2019 +0000
Strip flags & final_flags when we switch to CONTINUATION headers.
Fixes #2934
diff --git a/bin/varnishd/http2/cache_http2_send.c b/bin/varnishd/http2/cache_http2_send.c
index b3eb68801..dd20d1051 100644
--- a/bin/varnishd/http2/cache_http2_send.c
+++ b/bin/varnishd/http2/cache_http2_send.c
@@ -337,6 +337,8 @@ H2_Send(struct worker *wrk, struct h2_req *r2,
p += tf;
len -= tf;
ftyp = ftyp->continuation;
+ flags &= ftyp->flags;
+ final_flags &= ftyp->flags;
} while (!h2->error && len > 0);
}
}
diff --git a/bin/varnishtest/tests/r02934.vtc b/bin/varnishtest/tests/r02934.vtc
new file mode 100644
index 000000000..ac607b667
--- /dev/null
+++ b/bin/varnishtest/tests/r02934.vtc
@@ -0,0 +1,27 @@
+varnishtest "Bug in CONTINUATION flags when no sendbody"
+
+server s1 {
+ rxreq
+ expect req.proto == HTTP/1.1
+ txresp -hdr "Content-Type: text/plain" -hdrlen Foo 100
+
+} -start
+
+varnish v1 -cliok "param.set feature +http2"
+varnish v1 -cliok "param.set debug +syncvsl"
+varnish v1 -cliok "param.set debug +h2_nocheck"
+
+varnish v1 -vcl+backend { } -start
+
+client c1 {
+ stream 0 {
+ txsettings -framesize 64
+ rxsettings
+ } -run
+ stream 1 {
+ txreq -req HEAD
+ rxresp
+ expect resp.status == 200
+ expect resp.http.content-Type == "text/plain"
+ } -run
+} -run
More information about the varnish-commit
mailing list