• Category: Engineering post
  • Status: confirmed
  • Sources: Cloudflare blog, discussion
  • Summary: Cloudflare published a 2026-06-22 write-up of a six-week hunt for a bug in its Rust-based Images service, where larger transformed images intermittently returned a 200 status with the body cut short (a 2 MB response arriving as a few hundred kilobytes). The root cause was in hyper's HTTP/1 connection state machine in dispatch.rs: a let _ = before poll_flush discarded the result, including the Poll::Pending that signals an incomplete flush, so the write loop never learned that megabytes were still buffered. The fix was four lines.
  • Why it matters: It is a concrete example of how silently dropping a Poll::Pending in async Rust produces a data-truncation race that surfaces only under load and large payloads, a failure mode for any service building on hyper or hand-written poll loops.

Send feedback on this story