mirror of
https://github.com/zed-industries/zed.git
synced 2026-07-10 00:13:29 +00:00
StreamReader::poll_next dropped the reader it take()s whenever the read returned Poll::Pending, so the next poll reported end-of-stream. And poll_read_buf measured bytes via ReadBuf::filled(), which never advances when the reader writes through initialize_unfilled(), so every read counted as zero bytes. Together these made any AsyncBody::from_reader request body (e.g. one backed by async_fs::File, which returns Pending on its first read) upload as an empty or truncated body. Keep the reader across Pending polls and use the byte count that futures::AsyncRead::poll_read returns. - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - N/A Co-authored-by: Marshall <marshall@zed.dev> |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| LICENSE-APACHE | ||