[master] 391b4551e h2: do not send zero data frames
Nils Goroll
nils.goroll at uplex.de
Wed Nov 13 07:08:09 UTC 2019
commit 391b4551e6849159947db37fd581c3d78c9137b5
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Wed Nov 13 07:57:47 2019 +0100
h2: do not send zero data frames
I noticed that the stream 0 header accounting changes with len == 0 VDP
bytes, which seems useless.
diff --git a/bin/varnishd/http2/cache_http2_deliver.c b/bin/varnishd/http2/cache_http2_deliver.c
index f5faedce8..529042e33 100644
--- a/bin/varnishd/http2/cache_http2_deliver.c
+++ b/bin/varnishd/http2/cache_http2_deliver.c
@@ -109,6 +109,8 @@ h2_bytes(struct req *req, enum vdp_action act, void **priv,
if ((r2->h2sess->error || r2->error))
return (-1);
+ if (len == 0)
+ return (0);
H2_Send_Get(req->wrk, r2->h2sess, r2);
H2_Send(req->wrk, r2, H2_F_DATA, H2FF_NONE, len, ptr,
&req->acct.resp_bodybytes);
More information about the varnish-commit
mailing list