The Fix
Upgrade to version 0.11.4 or later.
Based on closed Kludex/uvicorn issue #243 · 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%.
@@ -2,13 +2,13 @@
import h11
import pytest
+
+from tests.response import Response
from uvicorn.config import Config
Option A — Upgrade to fixed release\nUpgrade to version 0.11.4 or later.\nWhen NOT to use: This fix should not be used if the default Server header is required for compliance.\n\n
Why This Fix Works in Production
- Trigger: I feel like messing with that will require constant vigilance as the upstream changes.
- Mechanism: The default Server header in Uvicorn responses was hardcoded and not configurable
- Why the fix works: Merged PR #302 which adds functionality to override the default Server header in Uvicorn responses. (first fixed release: 0.11.4).
- 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 default Server header in Uvicorn responses was hardcoded and not configurable
- Production symptom (often without a traceback): I feel like messing with that will require constant vigilance as the upstream changes.
Proof / Evidence
- GitHub issue: #243
- Fix PR: https://github.com/encode/uvicorn/pull/302
- First fixed release: 0.11.4
- 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.73
Discussion
High-signal excerpts from the issue thread (symptoms, repros, edge-cases).
“> I feel like messing with that will require constant vigilance as the upstream changes. That is true, it's not perfect. Hopefully this issue will…”
“PR has been merged which resolves this issue.”
“I think we should support a -h/--header interface to allow developers to explicitly set particular headers (and to override the default "Server" one) Should all…”
“@tomchristie; that sounds wonderful! Would you also supply an API method/parameter to do this?”
Failure Signature (Search String)
- I feel like messing with that will require constant vigilance as the upstream changes.
- Hey @tomchristie; I'm taking a look now. Should tests for this go in `tests/protocols/test_http.py`? I can't find any other place that really makes sense.
Copy-friendly signature
Failure Signature
-----------------
I feel like messing with that will require constant vigilance as the upstream changes.
Hey @tomchristie; I'm taking a look now. Should tests for this go in `tests/protocols/test_http.py`? I can't find any other place that really makes sense.
Error Message
Signature-only (no traceback captured)
Error Message
-------------
I feel like messing with that will require constant vigilance as the upstream changes.
Hey @tomchristie; I'm taking a look now. Should tests for this go in `tests/protocols/test_http.py`? I can't find any other place that really makes sense.
What Broke
Responses always included 'Server: uvicorn' header, limiting customization.
Why It Broke
The default Server header in Uvicorn responses was hardcoded and not configurable
Fix Options (Details)
Option A — Upgrade to fixed release Safe default (recommended)
Upgrade to version 0.11.4 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/uvicorn/pull/302
First fixed release: 0.11.4
Last verified: 2026-02-09. Validate in your environment.
When NOT to Use This Fix
- This fix should not be used if the default Server header is required for compliance.
Did This Fix Work in Your Case?
Quick signal helps us prioritize which fixes to verify and improve.
Prevention
- Capture the exact failing error string in logs and tests so you can reproduce via a minimal script.
- Pin production dependencies and upgrade only with a reproducible test that hits the failing path.
Version Compatibility Table
| Version | Status |
|---|---|
| 0.11.4 | Fixed |
Related Issues
No related fixes found.
Sources
We don’t republish the full GitHub discussion text. Use the links above for context.