diff --git a/src/parse.ts b/src/parse.ts index c13e3c4..b355075 100644 --- a/src/parse.ts +++ b/src/parse.ts @@ -134,7 +134,7 @@ export function getMessages( // line is of format ":" or ": " // https://html.spec.whatwg.org/multipage/server-sent-events.html#event-stream-interpretation const field = decoder.decode(line.subarray(0, fieldLength)); - const valueOffset = fieldLength + (line[fieldLength + 1] === ControlChars.Space ? 2 : 1); + const valueOffset = fieldLength + 1; const value = decoder.decode(line.subarray(valueOffset)); switch (field) {