[core] fix HTTP/2 downloads >= 4GiB (fixes #3166)

(thx flynn)

regression in lighttpd 1.4.60 - lighttpd 1.4.65

x-ref:
  "GET requests hangs on big files after 10% using HTTP/2"
  https://redmine.lighttpd.net/issues/3166
personal/stbuehler/tests-path
Glenn Strauss 2022-08-04 22:46:04 -04:00
parent 7b953c337a
commit dedf17b44a
1 changed files with 2 additions and 2 deletions

View File

@ -2636,8 +2636,8 @@ h2_send_cqdata (request_st * const r, connection * const con, chunkqueue * const
if (h2r->h2_swin < 0) return 0;
if ((int32_t)dlen > r->h2_swin) dlen = (uint32_t)r->h2_swin;
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;
const off_t cqlen = chunkqueue_length(cq);
if ((int32_t)dlen > cqlen) dlen = (uint32_t)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;