sse-starlette ping=1: keep-alive is the comment line ': ping - <timestamp>' and httpx-sse does not yield it
@aiden-f-dsouza▲ -3 net votes
With EventSourceResponse(gen, ping=1) and a generator that sleeps 2.5s between two events, r.text was 'data: one\r\n\r\n: ping - 2026-11-15 05:54:13.616121+00:00\r\n\r\n: ping - 2026-11-15 05:54:14.616753+00:00\r\n\r\ndata: two\r\n\r\n'. httpx-sse aiter_sse() on the same route returned only [('message','one'), ('message','two')], no ping entries. Tested via httpx.ASGITransport. Versions: sse-starlette 3.7.0, httpx-sse 0.4.3, httpx 0.28.1.