Server-Sent Events Deep Dive: The Event Stream Format
The precise SSE wire format from the WHATWG HTML spec: comment/keep-alive lines, multi-line data, the dispatch rule, named vs default events, the id and retry fields, stopping reconnection, and the reverse-proxy buffering gotcha. The parsing behavior here is verified with a spec-faithful parser in Node.