Mailing List Archive

[master] 9f6a7e3f9 http2_proto: Simplify CONTINUATION expectation check
commit 9f6a7e3f90c50565ff2184592a66d1c0e711502c
Author: Dridi Boukelmoune <dridi.boukelmoune@gmail.com>
Date: Mon Sep 11 17:52:00 2023 +0200

http2_proto: Simplify CONTINUATION expectation check

Before the h2 frame dispatch we only need to check that coming from a
HEADERS frame the very next frame is a CONTINUATION, when the HPACK
block didn't fit in the former.

The CONTINUATION dispatch will then make the stream consistency check.

diff --git a/bin/varnishd/http2/cache_http2_proto.c b/bin/varnishd/http2/cache_http2_proto.c
index 1ae72410c..d9210ff3c 100644
--- a/bin/varnishd/http2/cache_http2_proto.c
+++ b/bin/varnishd/http2/cache_http2_proto.c
@@ -1295,8 +1295,7 @@ h2_procframe(struct worker *wrk, struct h2_sess *h2, h2_frame h2f)
if (r2->stream == h2->rxf_stream)
break;

- if (h2->new_req != NULL &&
- !(r2 && h2->new_req == r2->req && h2f == H2_F_CONTINUATION))
+ if (h2->new_req != NULL && h2f != H2_F_CONTINUATION)
return (H2CE_PROTOCOL_ERROR); // rfc7540,l,1859,1863

h2e = h2f->rxfunc(wrk, h2, r2);
_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit