diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2022-06-05 21:51:15 -0400 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2022-06-07 19:23:53 -0400 |
commit | f20061e4821b61a22906a9d23d0d00f3ee992fd0 (patch) | |
tree | adca018f5eeef183ad873178a7bbd99000335fb0 | |
parent | ad4a7904959f833a6dfda1207fc0321347b6d8dd (diff) | |
download | lighttpd-git-f20061e4821b61a22906a9d23d0d00f3ee992fd0.tar.gz |
[core] h2: avoid sending tiny DATA frames
h2: avoid sending tiny DATA frames when h2 window is tiny
and a larger amount of data is pending to be sent;
wait for slightly larger window to be available
note: must temporarily disable this when running h2spec since some
h2spec tests expect 1-byte DATA frame, not a deferred response
-rw-r--r-- | src/h2.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -2624,6 +2624,9 @@ h2_send_cqdata (request_st * const r, connection * const con, chunkqueue * const if ((int32_t)dlen > h2r->h2_swin) dlen = (uint32_t)h2r->h2_swin; const uint32_t cqlen = (uint32_t)chunkqueue_length(cq); if (dlen > cqlen) dlen = cqlen; + /*(note: must temporarily disable next line when running h2spec since + * some h2spec tests expect 1-byte DATA frame, not a deferred response)*/ + else if (dlen < 2048 && cqlen >= 2048) return 0; if (0 == dlen) return 0; /* XXX: future: should have an interface which processes chunkqueue |