Sourced from gunicorn's releases.
gunicorn 27.0.1
Bug Fixes
- ASGI: serve the next request on a kept-alive HTTP/1.1 connection as soon as the previous response is complete. It used to wait until the application returned, so a background task (Starlette, FastAPI) held up every request behind it on the same connection (#3819).
- ASGI: refuse an informational (1xx) response sent after the final response has started, instead of writing it out of order (RFC 9110 §15.2).
- gthread: when a worker stops (
max_requests, reload, SIGTERM), keep its kept-alive connections open for up to 2 seconds and answer a request that arrives on one withConnection: close, instead of closing them right away. A client reusing such a connection, such as one following a redirect, lost its request (RFC 9112 §9.6) (#3821).Full changelog: https://github.com/benoitc/gunicorn/blob/master/docs/content/news.md
gunicorn 27.0.0
Breaking Changes
- Reject with 400 a request whose
Transfer-Encodingdoes not end withchunked, such asgziporidentityalone, with or withoutContent-Length(RFC 9112 §6.3). The WSGI workers used to read such a body until the connection closed and the ASGI worker treated it as empty. Clients that sendTransfer-Encoding: identitymust stop sending it.Bug Fixes
- Reject whitespace between a header name and the colon (RFC 9112 §5.1).
- Trim only spaces and tabs around
Transfer-Encodingvalues (RFC 9110 §5.6.3) (#3364).- Reject a
Content-Lengththat is not plain digits (RFC 9110 §8.6).- Reject chunk data not followed by CRLF (RFC 9112 §7.1).
- Reject control characters in the request path (RFC 9112 §3.2) (#3371).
- Return
414 URI Too Longfor a request line overlimit_request_line(RFC 9112 §3) (#2487).- ASGI: never write more body bytes than the app's
Content-Length, and close the connection when the body is shorter (RFC 9112 §6.3).- ASGI: close the connection when the app returns before finishing its response (RFC 9112 §6.3).
- ASGI: reject response header names and values that are not valid (RFC 9110 §5.1, §5.5).
- WSGI: reject a response status that is not three digits followed by a valid reason phrase (RFC 9112 §4).
... (truncated)
e143c8d
gunicorn 27.0.189cf093
Merge pull request #3822
from benoitc/fix/gthread-keepalive-on-stop4d6e86e
gthread: keep kept-alive connections briefly when the worker stops710d1b2
Merge pull request #3820
from benoitc/fix/asgi-keepalive-after-responsee00038f
asgi: keep waiting for a call that left request body unreada1f2063
tests: background tasks in the Starlette and FastAPI compat apps6122ae3
asgi: serve the next keep-alive request once the response is
complete332b3da
asgi: refuse a 1xx response sent after the final response started65798f4
Merge pull request #3815
from benoitc/release/27.0.0237de69
gunicorn 27.0.0