Skip to content

fix: set explicit Content-Type on seroval stream server function responses - #2301

Merged
birkskyum merged 3 commits into
solidjs:mainfrom
NicolasdRa:fix/seroval-stream-content-type
Aug 19, 2026
Merged

fix: set explicit Content-Type on seroval stream server function responses#2301
birkskyum merged 3 commits into
solidjs:mainfrom
NicolasdRa:fix/seroval-stream-content-type

Conversation

@NicolasdRa

Copy link
Copy Markdown
Contributor

Fixes #2295.

JSON-mode seroval-stream server function responses shipped without a Content-Type header, so intermediaries that content-sniff header-less responses (e.g. Go net/http-based reverse proxies like kamal-proxy) injected their own guess. This made the transport deployment-dependent and, on v1's client dispatch order, caused silent client-side navigation hangs.

As discussed in #2295, this sets Content-Type: text/plain; charset=utf-8 — matching the 1.x fix in #2092 — next to the existing X-Start-Type header, in both the success and the error serialization paths of handleServerFunction. The v2 client dispatches on X-Start-Type, so this changes no client behavior; it only makes the wire format explicit.

Changes:

  • packages/start/src/fns/handler.ts: set the header in both seroval JSON-stream paths (js mode already sets text/javascript)
  • packages/start/src/fns/handler.spec.ts: regression tests for the success and error paths (assert X-Start-Type and content-type)
  • patch changeset

vitest run in packages/start: 98/98 passing.

@changeset-bot

changeset-bot Bot commented Aug 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 649498b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@solidjs/start Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify

netlify Bot commented Aug 19, 2026

Copy link
Copy Markdown

Deploy Preview for solid-start-landing-page ready!

Name Link
🔨 Latest commit 649498b
🔍 Latest deploy log https://app.netlify.com/projects/solid-start-landing-page/deploys/6a859e7292f44f000890992a
😎 Deploy Preview https://deploy-preview-2301--solid-start-landing-page.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@pkg-pr-new

pkg-pr-new Bot commented Aug 19, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@solidjs/start@2301

commit: 649498b

@birkskyum
birkskyum merged commit d78288f into solidjs:main Aug 19, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug?]: v2 seroval-stream server function responses ship without Content-Type — proxies content-sniff text/plain

3 participants