mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-10-04 22:34:09 +07:00
A field line without a colon kept the \r of a CRLF line ending in its name, so "data\r\n" was not recognized. Strip the \r once per line before parsing instead of from each value. An event without a data field was neither dispatched nor cleared, so its event type leaked into the next event and its id only reached last_event_id after a later event was dispatched. Reset the message on every blank line and record the id even when nothing is dispatched. The parsing tests exercised a copy of parse_sse_line that had drifted from the real one. Run them through SSEClient against a local server instead, and add regression tests for the cases above.