[2.0 rc.13 + next] 304 format header overwrites cached GET representation
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- Half a day
- Newbie friendliness
- 75/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- web-dev
Research direction
Investigate how respond from @solidjs/web handles 304 responses. The bug is that a 304 response's format header overwrites the cached GET representation's body format, causing the decoder to consume the wrong format. Look for where 304 responses are constructed and how headers are merged with cached bodies, then ensure the cached representation's format is preserved.
Written by the indexing model from the issue text.
Description
Describe the bug
Browser-managed conditional GET should replay cached {value:17}. Both client fetches see 200, but the second decoded result is undefined.
Your Example Website or App
Steps to Reproduce the Bug or Issue
- Use the source below with the selected Solid build (complete setup is linked above).
import { getRequestEvent, respond } from "@solidjs/web";
export const calls: (string | null)[] = [];
export function read() {
const headers = {
etag: '"constant"',
"cache-control": "private, max-age=0, must-revalidate",
};
const conditional = getRequestEvent()!.request.headers.get("if-none-match");
calls.push(conditional);
// Call this GET twice in Chrome. Chrome adds If-None-Match itself.
// The second decoded value is undefined, despite cached { value: 17 }.
return conditional === '"constant"'
? new Response(null, { status: 304, headers })
: respond({ value: 17 }, { headers });
}
- Register
readas a GET server function namedconditional. From a Chrome page, callGET(createServerReference("conditional"))()twice. Chrome sends If-None-Match on the second request; application code sets no conditional header.
Expected behavior
Expected: Both decoded results are { value: 17 }.
Actual: The second result is undefined, although Chrome replays the cached body as status 200.
Platform
- Solid:
solid-js/@solidjs/webnext at3086f1b77cd7b0431d3a7f768c2984c335758633; comparison2.0.0-rc.13. Signals, compiler and diagnostics match the selected Solid build. - OS: macOS 26.6.2 (25G83); browser cases: system Google Chrome 155.0.8059.40. Server-only/type checks run in Bun 1.4.2.
- Builds/comparison: Development and production fail on HEAD and rc.13; HEAD also fails with observe (production runtime plus optional instrumentation).
Additional context
A 304 response reuses the cached body. Replacing its representation header without replacing the body makes the decoder consume the wrong format.
Development additionally warns that a scripted call returned 304, despite the browser-generated conditional request.
Full automated reproduction
One-command setup, run and expected output.
Copy the standalone folder into a fresh Bun project. The visible source above is executed by these tests; the additional files supply the required HTTP, compilation, and browser setup.
bun init -y
bun add [email protected] @solidjs/[email protected] @solidjs/[email protected] @solidjs/[email protected] @solidjs/[email protected]
bun add -d playwright
bun run link-head.ts /absolute/path/to/built/solid
BUILD_MODE=development bun test ./repro.test.ts
The link command selects a built Solid HEAD checkout; omit it for rc.13. Repeat with BUILD_MODE=production for the production comparison. Browser tests use system Google Chrome.
- Dominant language
- TypeScript
- Stars
- 36.1k
- Forks
- 1.1k
- Avg merge
- 11h 25m
- Merged PRs (30d)
- 345
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from solidjs/solid
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 12/100
Maintainers usually reply within 1 day
-
Select loses its bound value when options load asynchronouslyPossibly taken @MokiMeow claimed this 1 day ago. Open
Difficulty 3/5 Half a day Newbie friendliness 45/100
solidjs/solid#3928 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 18/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 24/100
solidjs/solid#3923 · 1 comment ·
Maintainers usually reply within 1 day
Similar issues
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 75/100
lingdojo/kana-dojo#32018 · 1 comment · 5 reactions ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
paperclipai/paperclip#15751 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
BuilderIO/agent-native#7275 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day