Sourced from gunicorn's releases.
26.0.0
Breaking Changes
- Eventlet worker removed: The
eventletworker class has been dropped. Migrate togevent,gthread, ortornado.New Features
- ASGI Framework Compatibility Suite: New end-to-end compatibility test harness covering Starlette, FastAPI, Litestar, Quart, Sanic, and BlackSheep. Current grid passes 438/444 tests (98%).
- ASGI Test Suite Expansion: 134 additional ASGI unit tests covering protocol semantics, lifespan, websockets, and chunked framing.
Security
- HTTP/1.1 Request-Target Validation (RFC 9112 sections 3.2.3, 3.2.4):
- Reject
authority-formrequest-target outsideCONNECT- Reject
asterisk-formrequest-target outsideOPTIONS- Reject
relative-referencerequest-targets- Header Field Hardening (RFC 9110):
- Reject control characters in header field-value (section 5.5)
- Reject forbidden trailer field-names (section 6.5.1)
- Reject
Content-Lengthlist form (RFC 9112 section 6.3)- Request Smuggling Hardening:
- Tighten keepalive gate and scope
finish_bodybyte cap- Keep
_body_receiveralive across the keepalive smuggling gate so pipelined requests cannot re-enter a closed body- Address parser/protocol findings from a six-point WSGI/ASGI audit
- PROXY Protocol (ASGI): Enforce
proxy_allow_ipsand tighten v1/v2 parsing in the ASGI callback parser.- Connection Draining: Drain the connection on close per RFC 9112 section 9.6 to prevent reset-on-close truncation.
Bug Fixes
- Body Framing on HEAD/204/304:
- Keep
Content-Lengthon HEAD and 304 responses (#3621)- Drop body framing on HEAD/204/304 even when the framework set it
- Warn once when an ASGI app emits a body for a no-body response
- HTTP/2 ASGI:
- Fix
_handle_stream_endedto set_body_completein the async HTTP/2 handler so request bodies finalize correctly on stream end- Add
InvalidChunkExtensionmapping and fast-parser support in ASGI tests (#3565)- HTTP/1.1 100-Continue: Stop adding
Transfer-Encoding: chunkedto 100-Continue interim responses.- WebSocket Close Handshake (RFC 6455):
- Comply with the close handshake state machine
- Close the transport after the close handshake completes
- Fix binary send when the
textkey isNone- Early Hints: Validate headers in the
early_hintscallback to matchprocess_headers; pass only the header name toInvalidHeader(#3588).- ASGI Framework Fixes:
- Fix ASGI disconnect handling for Django-style apps
- Fix Litestar request handling (use raw ASGI receive for body/headers)
- Fix Litestar HTTP endpoints for compatibility tests
- Fix Quart headers endpoint to normalize keys to lowercase
- Fix Quart WebSocket close test app (missing
accept())- Fix duplicate
Transfer-Encodingheader for BlackSheep streaming
... (truncated)
5d819cf
release: 26.0.0b45c70d
Merge pull request #3611
from zc-mattcen/docs-typo99c8d48
Merge pull request #3623
from benoitc/chore/drop-eventlet-add-h2-uvloop-test-...5a655af
Merge pull request #3622
from benoitc/test/docker-port-and-ipv4-fixes201df19
chore: remove eventlet worker; add h2 and uvloop to test depsf4ac8e1
test: pass action name to dirty client and stabilize after TTOU
spam54d38af
test: unblock docker fixtures on macOS hosts68843c8
Merge pull request #3621
from benoitc/fix/asgi-preserve-content-length-on-hea...31f2618
Merge pull request #3620
from benoitc/fix/asgi-proxy-protocol-trust-and-parsing41ec752
fix: keep Content-Length on HEAD and 304 responses