#7435 Worker stream API returns once instead of sequentially in wrangler dev
Duplicate of #8004 and #6577. Root cause identified (compression inference buffers streams). Fix in progress: PR #9625.
Close as duplicate of #8004
Analysis Report
Issue Review: cloudflare/workers-sdk#7435
Summary
Streaming API responses in wrangler dev are buffered and only returned when complete, rather than streaming sequentially. The root cause has been identified in miniflare's compression handling.
Findings
- Created: December 4, 2024
- Updated: October 30, 2025
- Version: Wrangler 3.92.0 → 4.60.0 (current)
- Component: Miniflare (compression in
entry.worker.ts) - Labels:
bug - Comments: 4 (with valuable investigation)
Key Evidence
- Root cause identified: A commenter (
seanparsons) traced the issue to packages/miniflare/src/workers/core/entry.worker.ts#L280 - compression is causing buffering - Version where it broke: miniflare
3.20240405.1(April 2024) - introduced in PR #5798 "miniflare: compress responses more like Cloudflare FL" - Fix in progress: PR #9625 "fix: streamed response bodies in Miniflare should not infer non-streaming compression by default" (opened June 17, 2025, still open)
- PR #9625 explicitly fixes: Issues #8004 and #6577 (duplicates of this issue)
- Workaround exists: Setting
Content-Encoding: noneheader bypasses the buffering - Duplicate issues: #6577 (Aug 2024), #8004 (Feb 2025) - both still open
Recommendation
Status: CLOSE (as duplicate)
Reasoning: This issue is a duplicate of #8004 and #6577, which are explicitly addressed in PR #9625. The fix is in progress and the open PR clearly states "Fixes #8004" and "Fixes #6577". Issue #7435 describes the same problem and has the same root cause, but is not linked in the PR.
Action: Close this issue as a duplicate of #8004, which has the pending fix in PR #9625.
Suggested Comment
Thank you for reporting this issue and for the detailed reproduction. This has been identified as a duplicate of #8004 and #6577, which are being addressed in PR #9625.
The root cause has been identified: when serving responses without an explicit
content-encodingheader, Miniflare was inferring a compression algorithm (usually gzip) that does not support streaming, causing the entire response to be buffered.Workaround: Until the fix is merged, you can work around this by setting a
Content-Encodingheader explicitly (e.g.,Content-Encoding: noneoridentity).Closing as duplicate of #8004. Please follow that issue or PR #9625 for updates on the fix.