Skip to content

Commit 0403594

Browse files
author
caiyuanhao
committed
Not to consume buf in the decode_string
Decoding error when processing continuation frames
1 parent c876dda commit 0403594

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/hpack/decoder.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,9 @@ impl Decoder {
319319
return ret;
320320
}
321321

322-
Ok(take(buf, len))
322+
let v = buf.chunk().copy_to_bytes(len);
323+
buf.advance(len);
324+
Ok(v)
323325
}
324326
}
325327

0 commit comments

Comments
 (0)