Skip to content

Commit

Permalink
Not to consume buf in the decode_string
Browse files Browse the repository at this point in the history
Decoding error when processing continuation frames
  • Loading branch information
caiyuanhao committed Dec 15, 2021
1 parent c876dda commit 0403594
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/hpack/decoder.rs
Expand Up @@ -319,7 +319,9 @@ impl Decoder {
return ret;
}

Ok(take(buf, len))
let v = buf.chunk().copy_to_bytes(len);
buf.advance(len);
Ok(v)
}
}

Expand Down

0 comments on commit 0403594

Please sign in to comment.