{
  "flavors": {
    "ok": "A correct stream, for comparison: retry, id, event and data fields, blank-line delimited, then a clean close. ?events= and ?interval= (ms).",
    "stall": "Headers and one event arrive, then nothing for ?seconds= (default 10, max 20), then a clean close. A client with a connect timeout but no read timeout waits here.",
    "cut": "Ends mid-event with a clean close: a complete event, then \"data: {\\\"partial\\\":tr\" and EOF with no blank line. The spec says discard it; many parsers emit it or leak it into the next connection.",
    "drop": "The connection is reset mid-event (HTTP/1.1: closed with bytes outstanding; HTTP/2: RST_STREAM). Your client should report an error, not a clean end. Carries a Content-Length so the runtime can reset for real.",
    "crlf": "Every line ends in CRLF. The spec allows CR, LF or CRLF; parsers that split on \"\\n\" leave a trailing \"\\r\" in every value.",
    "cr": "Every line ends in a bare CR. Spec-legal. Almost nobody handles it.",
    "no-space": "Field values with no space after the colon, two spaces, and nothing at all. The spec strips exactly one leading space: \"data:foo\" is \"foo\", \"data:  foo\" is \" foo\".",
    "multiline": "Multiple data: lines per event (joined with \"\\n\"), a colon inside a value, an empty data: line in the middle. Parsers that keep only the last line, or split on \":\", fail here.",
    "comments": "A leading BOM, \": keepalive\" comment lines, unknown fields (\"foo: bar\") and a field line with no colon. All four must be ignored; you should see exactly three events.",
    "split-utf8": "Multi-byte UTF-8 characters split across chunk boundaries (a 4-byte emoji as 2+2, a 3-byte euro sign as 1+2). A client that decodes each chunk separately sees U+FFFD.",
    "wrong-type": "A valid stream served as text/plain. A browser EventSource must fail; does your client notice?",
    "error-event": "An event whose name is \"error\". EventSource routes it to onerror beside real transport failures; does your client tell them apart?",
    "big": "One event with a ?bytes= (default 64 KiB, max 1 MiB) data line. Line buffers with a fixed cap truncate or crash.",
    "resume": "Sends events 1–3 and closes. Reconnect with Last-Event-ID: 3 and it sends 4–6; with 6 it answers 204 (stop). Its retry is 1000 ms so the three requests complete quickly. Does your client send Last-Event-ID on reconnect, and stop on a 204?"
  },
  "usage": "/sse/{flavor}",
  "limits": {
    "max_seconds": 20,
    "max_events": 100,
    "max_interval_ms": 5000,
    "max_bytes": 1048576
  },
  "reconnect": "Every stream starts with \"retry: 30000\" (resume alone sends \"retry: 1000\"). Any request carrying a Last-Event-ID header is answered 204 No Content (reconnect declined; a 204 tells EventSource to stop reconnecting), except /sse/resume, which continues from it."
}
