Browse Source

[core] fix bug when HTTP/2 frames span chunks

fix inverted logic when HTTP/2 frames span chunkqueue chunks
master
Glenn Strauss 2 years ago
parent
commit
c42b280583
  1. 2
      src/chunk.c

2
src/chunk.c

@ -794,7 +794,7 @@ void chunkqueue_compact_mem(chunkqueue *cq, size_t clen) {
chunk *c = cq->first;
buffer *b = c->mem;
size_t len = chunk_buffer_string_length(b) - c->offset;
if (len <= clen) return;
if (len >= clen) return;
if (b->size > clen) {
if (chunk_buffer_string_space(b) < clen - len)
chunkqueue_compact_mem_offset(cq);

Loading…
Cancel
Save