The Fix
Upgrade to version 0.7.2 or later.
Based on closed encode/httpx issue #873 · PR/commit linked
Production note: Most teams hit this during upgrades or environment changes. Roll out with a canary and smoke critical endpoints (health, OpenAPI/docs) before 100%.
@@ -23,4 +23,4 @@
from .status_codes import codes
-__version__ = "0.2.1"
+__version__ = "0.3.0"
# app.py
from starlette.applications import Starlette
from starlette.routing import Route
from starlette.responses import PlainTextResponse
async def home(request):
return PlainTextResponse("Hello, world!")
app = Starlette(routes=[Route("/", home)])
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.7.2 or later.\nWhen NOT to use: This fix should not be applied if the application relies on specific behaviors of the previous httpcore version.\n\n
Why This Fix Works in Production
- Trigger: I'm wondering if the reason you don't get HTTP/2 back is due to `verify=False`. AFAIK HTTPS is required by _us_ for HTTP/2 to work (we don't support `Upgrade:…
- Mechanism: The HTTP/2 support was not functioning correctly when proxies were applied due to an outdated version of httpcore
- Why the fix works: The issue with HTTP/2 not working when proxies are applied to the AsyncClient has been resolved by updating the version of httpcore to 0.3.0. (first fixed release: 0.7.2).
- If left unfixed, the same config can fail only in production (env differences), causing startup failures or partial feature outages.
Why This Breaks in Prod
- The HTTP/2 support was not functioning correctly when proxies were applied due to an outdated version of httpcore
- Production symptom (often without a traceback): I'm wondering if the reason you don't get HTTP/2 back is due to `verify=False`. AFAIK HTTPS is required by _us_ for HTTP/2 to work (we don't support `Upgrade: h2c` yet, see https://github.com/encode/httpx/issues/503).
Proof / Evidence
- GitHub issue: #873
- Fix PR: https://github.com/encode/httpcore/pull/72
- First fixed release: 0.7.2
- 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.69
Discussion
High-signal excerpts from the issue thread (symptoms, repros, edge-cases).
“> > > I just merged a change in HTTPCore dealing with this issue so this should be resolved from httpx 0.13. I can confirm…”
“I just merged a change in HTTPCore dealing with this issue so this should be resolved from httpx 0.13.”
“> I'm wondering if the reason you don't get HTTP/2 back is due to verify=False”
“im having these exact problem, using verify and http2 and proxy #905 is there any solution?”
Failure Signature (Search String)
- I'm wondering if the reason you don't get HTTP/2 back is due to `verify=False`. AFAIK HTTPS is required by _us_ for HTTP/2 to work (we don't support `Upgrade: h2c` yet, see
- <p>Certificate verification error for localhost: unable to get local issuer certificate (errno: 20, depth: 0)</p>
Copy-friendly signature
Failure Signature
-----------------
I'm wondering if the reason you don't get HTTP/2 back is due to `verify=False`. AFAIK HTTPS is required by _us_ for HTTP/2 to work (we don't support `Upgrade: h2c` yet, see https://github.com/encode/httpx/issues/503).
<p>Certificate verification error for localhost: unable to get local issuer certificate (errno: 20, depth: 0)</p>
Error Message
Signature-only (no traceback captured)
Error Message
-------------
I'm wondering if the reason you don't get HTTP/2 back is due to `verify=False`. AFAIK HTTPS is required by _us_ for HTTP/2 to work (we don't support `Upgrade: h2c` yet, see https://github.com/encode/httpx/issues/503).
<p>Certificate verification error for localhost: unable to get local issuer certificate (errno: 20, depth: 0)</p>
Minimal Reproduction
# app.py
from starlette.applications import Starlette
from starlette.routing import Route
from starlette.responses import PlainTextResponse
async def home(request):
return PlainTextResponse("Hello, world!")
app = Starlette(routes=[Route("/", home)])
Environment
- httpx: 0.13
Why It Broke
The HTTP/2 support was not functioning correctly when proxies were applied due to an outdated version of httpcore
Fix Options (Details)
Option A — Upgrade to fixed release Safe default (recommended)
Upgrade to version 0.7.2 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/httpcore/pull/72
First fixed release: 0.7.2
Last verified: 2026-02-09. Validate in your environment.
When NOT to Use This Fix
- This fix should not be applied if the application relies on specific behaviors of the previous httpcore version.
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.
- Add a TLS smoke test that performs a real handshake in CI (include CA bundle validation and hostname checks).
- Alert on handshake failures by error string and endpoint to catch cert/CA changes quickly.
Version Compatibility Table
| Version | Status |
|---|---|
| 0.7.2 | Fixed |
Related Issues
No related fixes found.
Sources
We don’t republish the full GitHub discussion text. Use the links above for context.