We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4052b2 commit 2bae61eCopy full SHA for 2bae61e
.changeset/tasty-hounds-poke.md
@@ -0,0 +1,5 @@
1
+---
2
+"@solidjs/start": patch
3
4
+
5
+fix infinite loop on unexpected response from server function (issue #1898)
packages/start/src/runtime/server-runtime.ts
@@ -58,6 +58,10 @@ class SerovalChunkReader {
58
// deserialize the data
59
const head = new TextDecoder().decode(this.buffer.subarray(1, 11));
60
const bytes = Number.parseInt(head, 16); // ;0x00000000;
61
+ if (Number.isNaN(bytes)) {
62
+ throw new Error(`Malformed server function stream header: ${head}`);
63
+ }
64
65
// Check if the buffer has enough bytes to be parsed
66
while (bytes > this.buffer.length - 12) {
67
// If it's not enough, and the reader is done
0 commit comments