The Fix
Upgrade to version 0.13.0 or later.
Based on closed encode/httpx issue #262 · PR/commit linked
@@ -96,6 +96,7 @@ async def send_connection_init(self, timeout: Timeout) -> None:
self.state.initiate_connection()
+ self.state.increment_flow_control_window(2 ** 24)
data_to_send = self.state.data_to_send()
await self.socket.write(data_to_send, timeout)
import httpx
import time
import requests
url = "https://quic.aiortc.org/50000000"
start = time.time()
r = requests.get(url)
print("requests %.1f s" % (time.time() - start))
for http_version in ["HTTP/1.1", "HTTP/2"]:
client = httpx.Client(http_versions=http_version)
start = time.time()
r = client.get(url)
print("httpx %s %.1f s" % (http_version, time.time() - start))
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 should not be applied if flow control settings are already optimized for your use case.\n\n
Why This Fix Works in Production
- Trigger: url = "https://quic.aiortc.org/50000000"
- Mechanism: Flow control window sizes were set too low, negatively impacting HTTP/2 download speeds
- Why the fix works: Bump up flow control defaults to improve HTTP/2 download speeds. (first fixed release: 0.13.0).
- If left unfixed, this can cause silent data inconsistencies that propagate (bad cache entries, incorrect downstream decisions).
Why This Breaks in Prod
- Flow control window sizes were set too low, negatively impacting HTTP/2 download speeds
- Production symptom (often without a traceback): url = "https://quic.aiortc.org/50000000"
Proof / Evidence
- GitHub issue: #262
- Fix PR: https://github.com/encode/httpx/pull/629
- 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.55
Discussion
High-signal excerpts from the issue thread (symptoms, repros, edge-cases).
“Actually the issue I reported was *download* speeds, and it does seem to be linked to HTTP/2. Here is a script to reproduce the issue:…”
“Okay, at this point it's a bit more complicated, since we've also got different performance on the server side too”
“Okay, that's really helpful, thanks”
“The server mentioned (quic.aiortc.org) above is serving HTTP/1.1 and HTTP/2 using nginx talking (over HTTP/1.1) to uvicorn”
Failure Signature (Search String)
- url = "https://quic.aiortc.org/50000000"
- url = "https://httpbin.org/stream-bytes/50000000"
Copy-friendly signature
Failure Signature
-----------------
url = "https://quic.aiortc.org/50000000"
url = "https://httpbin.org/stream-bytes/50000000"
Error Message
Signature-only (no traceback captured)
Error Message
-------------
url = "https://quic.aiortc.org/50000000"
url = "https://httpbin.org/stream-bytes/50000000"
Minimal Reproduction
import httpx
import time
import requests
url = "https://quic.aiortc.org/50000000"
start = time.time()
r = requests.get(url)
print("requests %.1f s" % (time.time() - start))
for http_version in ["HTTP/1.1", "HTTP/2"]:
client = httpx.Client(http_versions=http_version)
start = time.time()
r = client.get(url)
print("httpx %s %.1f s" % (http_version, time.time() - start))
Why It Broke
Flow control window sizes were set too low, negatively impacting HTTP/2 download speeds
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/629
First fixed release: 0.13.0
Last verified: 2026-02-09. Validate in your environment.
When NOT to Use This Fix
- This fix should not be applied if flow control settings are already optimized for your use case.
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.