Benoit Chesneau
9bc5891b4b
fix: drop body framing on HEAD/1xx/204/304 in WSGI responses
...
Mirror the ASGI strip-and-warn behavior (commits 2191832b, 41ec7527,
0d35d2ae) on the WSGI path. Previously gunicorn would forward an
app-supplied Content-Length and body bytes for HEAD requests and
1xx/204/304 responses, violating RFC 9110 / RFC 9112.
- Add _response_omits_body() and _response_forbids_content_length()
helpers on Response.
- After process_headers, strip Content-Length and clear
response_length on 1xx/204 (RFC 9110 §6.4.2 forbids it). HEAD and
304 keep app-supplied Content-Length.
- write() and sendfile() drop body bytes for no-body responses and
log a single WARNING per request.
- is_chunked() now also covers 1xx via _omits_body.
Fixes #3413
2026-05-05 11:30:24 +02:00
..
2026-02-06 08:21:18 +01:00
2026-03-23 20:08:03 +01:00
2026-02-12 23:52:12 +01:00
2026-05-04 10:32:44 +02:00
2026-05-03 22:28:48 +02:00
2026-03-22 17:50:32 +01:00
2026-04-19 23:48:18 +02:00
2026-02-01 03:04:35 +01:00
2026-01-25 10:23:25 +01:00
2026-02-06 08:21:18 +01:00
2024-04-22 03:33:30 +02:00
2026-02-03 01:15:39 +01:00
2026-03-26 15:46:51 +01:00
2026-04-02 23:55:27 +02:00
2026-05-03 20:42:55 +02:00
2026-04-03 09:09:16 +02:00
2026-04-03 09:09:16 +02:00
2026-04-03 09:09:16 +02:00
2026-03-22 17:07:08 +01:00
2026-04-19 10:43:01 +02:00
2026-05-03 21:18:15 +02:00
2026-04-03 09:09:16 +02:00
2026-03-26 06:32:15 +01:00
2026-04-04 03:10:52 +02:00
2026-04-03 09:09:16 +02:00
2026-05-03 22:28:48 +02:00
2026-05-03 22:32:28 +02:00
2026-01-25 14:45:07 +01:00
2026-05-03 18:19:08 +02:00
2026-04-03 09:09:16 +02:00
2026-03-23 13:08:57 +01:00
2026-05-03 22:28:48 +02:00
2026-03-23 20:08:03 +01:00
2026-05-03 19:13:40 +02:00
2026-02-01 03:04:35 +01:00
2026-02-11 23:03:40 +01:00
2026-01-25 10:21:18 +01:00
2026-01-25 10:21:18 +01:00
2026-02-01 02:40:09 +01:00
2026-01-25 10:21:18 +01:00
2026-02-11 23:12:44 +01:00
2026-02-11 22:58:43 +01:00
2026-02-12 21:45:49 +01:00
2026-02-11 23:39:53 +01:00
2026-02-11 23:01:21 +01:00
2026-04-13 17:21:24 +08:00
2026-02-19 15:21:01 +01:00
2026-01-23 00:02:01 +01:00
2026-05-03 18:19:08 +02:00
2026-05-05 00:36:46 +02:00
2026-01-27 15:42:42 +01:00
2026-01-27 10:51:29 +01:00
2026-04-01 11:57:03 +11:00
2026-01-27 09:57:32 +01:00
2026-01-27 09:57:32 +01:00
2026-01-27 11:44:33 +01:00
2026-03-26 14:15:14 +11:00
2026-05-05 11:30:24 +02:00
2026-04-19 10:43:01 +02:00
2026-02-06 08:21:18 +01:00
2024-04-22 03:33:14 +02:00
2026-03-21 23:24:23 +01:00
2026-02-06 08:21:18 +01:00
2026-03-23 14:10:05 +01:00
2024-04-22 03:33:14 +02:00
2024-04-22 03:33:14 +02:00
2026-02-06 08:21:18 +01:00
2024-04-22 03:33:14 +02:00
2024-04-22 03:33:14 +02:00
2026-01-22 18:32:17 +01:00
2026-03-22 13:43:18 +01:00
2026-03-31 03:07:56 +02:00
2026-03-26 15:46:51 +01:00