From 50ee49d81cb1549e5b3c0bc1191225a132be7c5c Mon Sep 17 00:00:00 2001 From: "Alexis H. Munsayac" Date: Wed, 19 Aug 2026 13:22:54 +0800 Subject: [PATCH 1/2] fix: incomplete chunk head --- packages/start/src/runtime/serialization.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/start/src/runtime/serialization.ts b/packages/start/src/runtime/serialization.ts index 598fa822c..c831dba13 100644 --- a/packages/start/src/runtime/serialization.ts +++ b/packages/start/src/runtime/serialization.ts @@ -140,10 +140,14 @@ class SerovalChunkReader { async next(): Promise< { done: true; value: undefined } | { done: false; value: string } > { - // Check if the buffer is empty - if (this.buffer.length === 0) { + // Check if the buffer is empty or incomplete + if (this.buffer.length < 12) { // if we are already done... if (this.done) { + // incomplete stream + if (this.buffer.length !== 0) { + throw new Error("Malformed server function stream."); + } return { done: true, value: undefined, From d764a3ef8b83cc11ced60e361022670de9995196 Mon Sep 17 00:00:00 2001 From: "Alexis H. Munsayac" Date: Wed, 19 Aug 2026 19:59:44 +0800 Subject: [PATCH 2/2] Create cute-seas-slide.md --- .changeset/cute-seas-slide.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/cute-seas-slide.md diff --git a/.changeset/cute-seas-slide.md b/.changeset/cute-seas-slide.md new file mode 100644 index 000000000..f105947b1 --- /dev/null +++ b/.changeset/cute-seas-slide.md @@ -0,0 +1,5 @@ +--- +"@solidjs/start": patch +--- + +fix potentially incomplete first chunk for chunk readers