Closed chrislearn closed 1 year ago
The collect combinator should probably filter out the empty data frames, to prevent the panic.
In push_frame
, just push data to bufs and does not check is data is empty.
In Collect
's poll function, call push_frame
directly and push the frame.
Hi what's the status on this? Anyone working on adding this change?
Had to make this change for our project, can send a PR if no one is working on this.
No I don't think anyone is working on it. You're welcome to submit a PR.
Hey, we'd love to use an officially released version. Is it possible to please create a release? @seanmonstar
https://github.com/hyperium/http-body/blob/619ba28c5699c8f47608c31c56a30a488fae769d/http-body-util/src/collected.rs#L44 https://github.com/hyperium/http-body/blob/619ba28c5699c8f47608c31c56a30a488fae769d/http-body-util/src/util.rs#L14
When frame is empty, this cause panic, just wondering if this is expected behavior? Some HTTP/2 implementations may product empty frames, when I create a reverse proxy server,and call
body.collect().await.to_bytes()
to read data, server will give error in debug mode. Or just give a warning here?