Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
aab56de
fix(release): skip already-published packages in artifact verification
claude Nov 18, 2026
21b45b7
fix(signals): a reader linked to a settled source no longer stays pen…
gnovotny Nov 18, 2026
70bbe00
Merge remote-tracking branch 'origin/main' into HEAD
claude Nov 18, 2026
fff489c
Merge old claude/project-thread-vnjtow head (already squashed into ma…
claude Nov 18, 2026
eec58ab
fix(web): send an empty revalidate declaration as a non-empty header
Marve10s Nov 23, 2026
c5eb104
fix(compiler): treat only a leading comment equal to the static marke…
Marve10s Nov 23, 2026
847d742
Merge main into fix-compiler-static-marker-exact (resolve imports wit…
claude Nov 24, 2026
1432183
Merge old claude/project-thread-vnjtow head (already squashed into main)
claude Nov 24, 2026
521cf4a
Merge main into claude/project-thread-vnjtow
claude Nov 24, 2026
6669b9a
fix(web): a server function's ReadableStream result stays a ReadableS…
claude Nov 24, 2026
d2438f9
fix(web): check getReader instead of instanceof ReadableStream
claude Nov 24, 2026
f464217
fix(web): write the empty revalidate header once; digest it to no keys
claude Nov 24, 2026
5327216
Merge remote-tracking branch 'origin/main' into pr-5169
claude Nov 24, 2026
8b88b1a
merge: keep branch history (already squashed into main as #5184)
claude Nov 24, 2026
e0a7702
fix(release): wait for the dispatched compiler binary run before watc…
claude Nov 24, 2026
066feb8
merge: keep branch history (already squashed into main as #5190)
claude Nov 24, 2026
c90009f
fix(release): poll the compiler binary run instead of gh run watch
claude Nov 24, 2026
5de8cc1
merge: keep branch history (already squashed into main as #5191)
claude Nov 24, 2026
fbed5b6
fix(signals): a re-parked reader drops a pending source disposed whil…
gnovotny Nov 25, 2026
501982b
chore(size): re-record the six scenarios over their caps on main
claude Nov 26, 2026
9323ace
merge: keep branch history (already squashed into main as #5194)
claude Nov 26, 2026
ba721ca
chore(signals): pin Sparkplug tiering in the signals bench lane
claude Nov 26, 2026
61a81bf
merge: keep branch history (already squashed into main as #5215)
claude Nov 26, 2026
f521431
Merge branch 'main' into fix-disposed-pending-source-prune
ryansolid Nov 26, 2026
60773c6
Merge main into #5207 (regenerate RULES-INDEX after #4906)
claude Nov 26, 2026
71c1e57
Merge branch 'claude/project-thread-vnjtow' (history only)
claude Nov 26, 2026
83ac024
chore(size): re-record the three scenarios over their caps on main
claude Nov 26, 2026
e4e11b0
Merge branch 'claude/project-thread-vnjtow' (history only)
claude Nov 26, 2026
7ee678a
feat(web): add Link headers for the client entry's assets
brenelz Nov 26, 2026
ce1f26d
fix(web): hint entry scripts with preload as=script for Early Hints
brenelz Nov 26, 2026
0f7292a
fix(web): encode non-BMP characters in Link targets as whole code points
brenelz Nov 26, 2026
40f3e76
fix(web): append stub Link values to the base response head
brenelz Nov 26, 2026
edfc990
test(signals): gate the affects(list) holder test on a promise, not a…
claude Nov 27, 2026
3723416
Merge branch 'claude/project-thread-vnjtow' (history only)
claude Nov 27, 2026
d5be4cb
Merge main into #5241
claude Nov 27, 2026
2c18e53
Merge main into #5241
claude Nov 27, 2026
94568d1
Merge main into #5241
claude Nov 27, 2026
52171e3
chore(size): re-record the four scenarios over their caps on main
claude Nov 27, 2026
5256341
Merge prior branch history (ours)
claude Nov 28, 2026
b1c55c3
Merge branch 'pr5230' into claude/project-thread-vnjtow
claude Nov 28, 2026
87bbf35
chore(size): raise the renderToString floor for the entry Link header…
claude Nov 28, 2026
18a1860
fix(signals): clear held error on outer boundary when inner error bou…
MilindChatrabhuji Nov 28, 2026
e0ab855
docs(signals): update D-38 src citation count in RULES-INDEX
MilindChatrabhuji Nov 28, 2026
64668b8
fix(signals): defer mid-flush unhandled async diagnostic until settle…
MilindChatrabhuji Nov 29, 2026
0e37133
fix(web): send a GET server function call with file arguments over POST
Marve10s Nov 23, 2026
eec3e8d
fix(web): refuse file arguments in a GET call instead of switching it…
Marve10s Nov 25, 2026
5a13049
chore(size): re-record the server-function page caps for the GET file…
Marve10s Dec 1, 2026
62c0d94
Merge prior branch history (ours)
claude Dec 2, 2026
86f7cd5
Merge branch 'pr5270' into HEAD
claude Dec 2, 2026
86c626c
test(solid): type the #5203 spec's object fallback for test-types
claude Dec 2, 2026
3565342
Merge prior branch history (ours)
claude Dec 2, 2026
86098fd
Merge branch 'pr5269' into HEAD
claude Dec 2, 2026
bb944a2
chore(size): re-record the caps the nested Errored release grows (#5269)
claude Dec 2, 2026
3df8ee4
Merge remote-tracking branch 'origin/claude/project-thread-vnjtow' in…
claude Dec 2, 2026
21a6978
Merge main into #5177 and re-record the size caps it grows
claude Dec 2, 2026
4b3a047
Merge branch 'claude/project-thread-vnjtow' of https://github.com/sol…
claude Dec 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/get-file-arguments-error.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@solidjs/web": patch
---

A `GET` server function called with a file among its arguments (with `enableRichArguments`) now throws a clear error before sending, instead of putting `[object FormData]` in the url and failing with a 400. A `GET` call whose codec-encoded arguments are too long for a url and go over POST now sends the encoding it already made instead of encoding the arguments a second time, so a one-shot argument such as an async iterator arrives with all its chunks.
16 changes: 13 additions & 3 deletions packages/web/server-functions/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -755,13 +755,14 @@ async function initializeResponse(base, id, options, args, meta) {
// The encoder answers `FormData` when the arguments hold files (see
// uploads.js). No content type is set here: fetch gives a string body
// `text/plain` and a form its multipart boundary, which is how the handler
// tells the two apart.
// tells the two apart. A GET call too long for its url brings the encoding
// it already made, so a one-shot argument is read once.
return createRequest(
base,
id,
{
...options,
body: await serializeArguments(args),
body: options.body ?? (await serializeArguments(args)),
headers: {
...options.headers,
[BODY_FORMAT_HEADER]: BodyFormat.Serialized
Expand Down Expand Up @@ -1210,6 +1211,9 @@ export function GET(fn) {
// The handler accepts both encodings: plain JSON and the codec's framed
// string (distinguished by the `;0x` frame prefix).
const encoded = isJSONSafe(args) ? JSON.stringify(args) : await serializeArguments(args);
if (typeof encoded !== "string") {
throw new Error("A GET server function cannot send files: use POST");
}
const url = `${address}?args=${encodeURIComponent(encoded)}`;
const absolute = new URL(url, globalThis.location?.href || "http://localhost").href;
// Arguments too long for a url call over POST instead: a cache miss, not
Expand All @@ -1220,7 +1224,13 @@ export function GET(fn) {
// says so, and a POST-shaped read must not ask the server for
// single-flight collection, which is mutation policy.
if (absolute.length > MAX_GET_URL_LENGTH) {
return fetchServerFunction(address, id, { ...opts, read: true }, args, metadata);
return fetchServerFunction(
address,
id,
{ ...opts, read: true, body: encoded },
args,
metadata
);
}
return fetchServerFunction(url, id, { ...opts, method: "GET" }, [], metadata, args);
};
Expand Down
23 changes: 21 additions & 2 deletions packages/web/test/server/server-functions-body-formats.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@
import { AsyncLocalStorage } from "node:async_hooks";
import { afterAll, beforeAll, describe, expect, it } from "vitest";
import {
GET as serverGET,
createServerReference as createServerSideReference,
handleServerFunctionRequest,
registerServerFunction
registerServerFunction,
registerServerReference
} from "@solidjs/web/server-functions/server";
import { createServerReference } from "@solidjs/web/server-functions/client";
import { GET, createServerReference } from "@solidjs/web/server-functions/client";

const RequestContext = Symbol.for("solid.RequestContext");
const BODY_FORMAT_HEADER = "X-Server-Function-Format";
Expand Down Expand Up @@ -173,6 +176,22 @@ describe("an argument with a natural HTTP encoding", () => {
});
});

describe("a GET call with a File argument", () => {
it("asks for the codec without sending a request", async () => {
serverGET(
createServerSideReference(registerServerReference("rich-get-file", async () => "ran"))
);
const transport = connectTransport();
try {
const read = GET(createServerReference("rich-get-file"));
await expect(read(new File(["hello"], "a.txt"))).rejects.toThrow(/enableRichArguments/);
} finally {
transport.restore();
}
expect(transport.requests).toEqual([]);
});
});

describe("a bound call ending in a natural encoding", () => {
it("puts the leading arguments in the url and the body last, in declared order", async () => {
let ran = 0;
Expand Down
54 changes: 52 additions & 2 deletions packages/web/test/server/server-functions-uploads.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@
import { AsyncLocalStorage } from "node:async_hooks";
import { afterAll, beforeAll, describe, expect, it } from "vitest";
import {
GET as serverGET,
createServerReference as createServerSideReference,
handleServerFunctionRequest,
registerServerFunction
registerServerFunction,
registerServerReference
} from "@solidjs/web/server-functions/server";
import { createServerReference } from "@solidjs/web/server-functions/client";
import { GET, createServerReference } from "@solidjs/web/server-functions/client";
// @ts-ignore — the rich-args dist has no adjacent type declarations.
import { enableRichArguments } from "../../server-functions/dist/rich-args.js";

Expand Down Expand Up @@ -286,6 +289,53 @@ describe("files in codec arguments", () => {
});
});

describe("a GET call with the codec", () => {
const declareRead = <A extends unknown[]>(id: string, fn: (...args: A) => unknown) => {
serverGET(createServerSideReference(registerServerReference(id, fn)));
return GET(createServerReference(id));
};

it("refuses arguments holding a file without sending a request", async () => {
const read = declareRead("get-upload-files", async (..._args: unknown[]) => "ran");
const file = () => new File(["hello"], "a.txt", { type: "text/plain" });
const form = new FormData();
form.set("doc", file());
const transport = connectTransport();
try {
for (const args of [[file()], [1, file()], [form], [{ doc: new Blob(["hi"]) }]]) {
await expect(read(...args)).rejects.toThrow("A GET server function cannot send files");
}
} finally {
transport.restore();
}
expect(transport.requests).toEqual([]);
});

it("reads a one-shot argument once when long arguments go over POST", async () => {
const read = declareRead(
"get-upload-once",
async (input: { padding: string; source: AsyncIterable<string> }) => {
const seen: string[] = [];
for await (const chunk of input.source) seen.push(chunk);
return seen;
}
);
async function* chunks() {
yield "one";
yield "two";
}
const transport = connectTransport();
try {
expect(await read({ padding: "x".repeat(3000), source: chunks() })).toEqual(["one", "two"]);
} finally {
transport.restore();
}
const [request] = transport.requests;
expect(request.method).toBe("POST");
expect(new URL(request.url).search).toBe("");
});
});

describe("malformed uploads", () => {
// A real upload body, captured, so each case changes one thing about it.
async function capture() {
Expand Down
8 changes: 4 additions & 4 deletions scripts/size/floor-caps.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
"minified": 54093
},
"page: base server components (hydrating + dynamic + frames + sf reference)": {
"cap": "34.25 KB",
"minified": 102498
"cap": "34.31 KB",
"minified": 102604
},
"page: live server components (base + live/GET + action + isPending/latest)": {
"cap": "41.68 KB",
"minified": 125358
"cap": "41.79 KB",
"minified": 125464
},
"server: floor (getRequestEvent + isServer)": {
"cap": "1.33 KB",
Expand Down
Loading
Loading