Skip to content

v1.2.69

@loglux loglux tagged this 10 May 12:29
The catch-all branch for unknown `notifications/*` methods returned
`JSONResponse(status_code=204, content={})`, which emits an `{}` body
with `Content-Length: 2`. RFC 7230 §3.3.2 forbids a body on 204, and
uvicorn/h11 enforces this — clients got their 204 fine, but the
ASGI stack raised `LocalProtocolError: Too much data for declared
Content-Length` and logged a long Traceback for every such request.

Reproduced live with `notifications/cancelled`, fixed by switching to
`Response(status_code=204)` (matching the existing happy path on
line 61 for `notifications/initialized`). Regression test asserts
both status and empty body on the catch-all path.
Assets 2
Loading