Benoit Chesneau 41ec7527db fix: keep Content-Length on HEAD and 304 responses
RFC 9110 §6.4.2 forbids Content-Length only on 1xx and 204 responses.
HEAD MAY include the Content-Length the same GET would return, and 304
MAY include the Content-Length the unconditional response would carry.
WSGI preserves app-supplied Content-Length on those statuses; ASGI was
stripping it indiscriminately for any no-body response.

Split the predicate: _response_forbids_content_length() returns True
only for 1xx/204; _strip_body_framing_headers(headers, status) always
strips Transfer-Encoding (no body, no chunked terminator) and strips
Content-Length only when forbidden.
2026-05-03 22:32:28 +02:00
..
2026-02-06 08:21:18 +01:00
2026-02-06 08:21:18 +01:00
2024-04-22 03:33:30 +02:00
2026-01-27 09:57:32 +01:00
2026-01-27 09:57:32 +01:00
2026-02-06 08:21:18 +01: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-02-06 08:21:18 +01:00
2024-04-22 03:33:14 +02:00