[core] fix merging large headers across mult reads (fixes #3059)

(thx mitd)

x-ref:
  "Connections stuck in Close_Wait causing 100% cpu usage"
  https://redmine.lighttpd.net/issues/3059
personal/stbuehler/tests-path
Glenn Strauss 2021-01-28 23:30:39 -05:00
parent cf3e301272
commit b03b86f47b
1 changed files with 1 additions and 1 deletions

View File

@ -626,7 +626,7 @@ static chunk * connection_read_header_more(connection *con, chunkqueue *cq, chun
if (cq->first != cq->last && 0 != olen) {
const size_t clen = chunkqueue_length(cq);
size_t block = (olen + (16384-1)) & (16384-1);
size_t block = (olen + (16384-1)) & ~(16384-1);
block += (block - olen > 1024 ? 0 : 16384);
chunkqueue_compact_mem(cq, block > clen ? clen : block);
}