Skip to content

Commit 9586dc1

Browse files
authored
Merge branch '1.x' into feat-seroval-json-1.x
2 parents 1958520 + 7144da5 commit 9586dc1

3 files changed

Lines changed: 9 additions & 4 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@solidjs/start": patch
3+
---
4+
5+
fix: use percent encoding for `x-server-id` header value instead of reserved `#` character

packages/start/src/runtime/server-handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ async function handleServerFunction(h3Event: HTTPEvent) {
3131
let functionId: string | undefined | null, name: string | undefined | null;
3232
if (serverReference) {
3333
invariant(typeof serverReference === "string", "Invalid server function");
34-
[functionId, name] = serverReference.split("#");
34+
[functionId, name] = decodeURIComponent(serverReference).split("#");
3535
} else {
3636
functionId = url.searchParams.get("id");
3737
name = url.searchParams.get("name");

packages/start/src/runtime/server-runtime.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ function createRequest(
1919
...options,
2020
headers: {
2121
...options.headers,
22-
"X-Server-Id": id,
23-
"X-Server-Instance": instance,
24-
},
22+
"X-Server-Id": encodeURIComponent(id),
23+
"X-Server-Instance": instance
24+
}
2525
});
2626
}
2727

0 commit comments

Comments
 (0)