The Fix
Upgrade to version 0.13.0 or later.
Based on closed encode/httpx issue #877 · PR/commit linked
@@ -46,10 +46,8 @@ async def send(self, request: Request, timeout: TimeoutTypes = None) -> Response
await self._send_request(request, timeout)
-
- task, args = self._send_request_data, [request.stream(), timeout]
- async with self.backend.background_manager(task, *args):
from typing import Callable
import uvicorn
from starlette.requests import Request
from starlette.responses import PlainTextResponse
async def app(scope: dict, receive: Callable, send: Callable) -> None:
request = Request(scope, receive=receive)
size = 0
async for chunk in request.stream():
size += len(chunk)
if size > 1000:
response = PlainTextResponse("Too large", status_code=413)
await response(scope, receive, send)
break
uvicorn.run(app, log_level="trace")
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
Option A — Upgrade to fixed release\nUpgrade to version 0.13.0 or later.\nWhen NOT to use: This fix is not suitable for scenarios requiring concurrent send/read functionality.\n\n
Why This Fix Works in Production
- Trigger: ... so I cannot receive anything until once the request is completely sent.
- Mechanism: Simplifies the HTTP/1.1 dispatcher by removing the concurrent send/read functionality, which was deemed unnecessarily complex.
- Why the fix works: Simplifies the HTTP/1.1 dispatcher by removing the concurrent send/read functionality, which was deemed unnecessarily complex. (first fixed release: 0.13.0).
Why This Breaks in Prod
- Production symptom (often without a traceback): ... so I cannot receive anything until once the request is completely sent.
Proof / Evidence
- GitHub issue: #877
- Fix PR: https://github.com/encode/httpx/pull/569
- First fixed release: 0.13.0
- Reproduced locally: No (not executed)
- Last verified: 2026-02-09
- Confidence: 0.85
- Did this fix it?: Yes (upstream fix exists)
- Own content ratio: 0.48
Discussion
High-signal excerpts from the issue thread (symptoms, repros, edge-cases).
“For now this is solved by speaking HTTP by hand. I'll have a closer look if we need more tests. Thanks!”
“Nope, that's not supported”
“Clients such as curl and browsers' fetch API actually do support it, as do many HTTP servers (I specifically need this in tests of Sanic…”
“> I specifically need this in tests of Sanic server You might want to double check, since I think the ASGI dispatcher would handle this,…”
Failure Signature (Search String)
- ... so I cannot receive anything until once the request is completely sent.
- You might want to double check, since I think the ASGI dispatcher would handle this, even if the over-the-wire HTTP/1.1 dispatcher doesn't.
Copy-friendly signature
Failure Signature
-----------------
... so I cannot receive anything until once the request is completely sent.
You might want to double check, since I think the ASGI dispatcher would handle this, even if the over-the-wire HTTP/1.1 dispatcher doesn't.
Error Message
Signature-only (no traceback captured)
Error Message
-------------
... so I cannot receive anything until once the request is completely sent.
You might want to double check, since I think the ASGI dispatcher would handle this, even if the over-the-wire HTTP/1.1 dispatcher doesn't.
Minimal Reproduction
from typing import Callable
import uvicorn
from starlette.requests import Request
from starlette.responses import PlainTextResponse
async def app(scope: dict, receive: Callable, send: Callable) -> None:
request = Request(scope, receive=receive)
size = 0
async for chunk in request.stream():
size += len(chunk)
if size > 1000:
response = PlainTextResponse("Too large", status_code=413)
await response(scope, receive, send)
break
uvicorn.run(app, log_level="trace")
What Broke
Users cannot receive response data until the entire request body is sent, causing delays.
Fix Options (Details)
Option A — Upgrade to fixed release Safe default (recommended)
Upgrade to version 0.13.0 or later.
Use when you can deploy the upstream fix. It is usually lower-risk than long-lived workarounds.
Fix reference: https://github.com/encode/httpx/pull/569
First fixed release: 0.13.0
Last verified: 2026-02-09. Validate in your environment.
When NOT to Use This Fix
- This fix is not suitable for scenarios requiring concurrent send/read functionality.
Verify Fix
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
Did This Fix Work in Your Case?
Quick signal helps us prioritize which fixes to verify and improve.
Prevention
- Add a CI check that diffs key outputs after upgrades (OpenAPI schema snapshots, JSON payload shapes, CLI output).
- Upgrade behind a canary and run integration tests against the canary before 100% rollout.
Version Compatibility Table
| Version | Status |
|---|---|
| 0.13.0 | Fixed |
Related Issues
No related fixes found.
Sources
We don’t republish the full GitHub discussion text. Use the links above for context.