Skip to content

fix: defer handler response until stream shell payload - #2231

Merged
birkskyum merged 5 commits into
mainfrom
fix-2229-await-stream-shell-payload
Jul 25, 2026
Merged

fix: defer handler response until stream shell payload#2231
birkskyum merged 5 commits into
mainfrom
fix-2229-await-stream-shell-payload

Conversation

@katywings

@katywings katywings commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

What is the current behavior?

h3 v2 no longer waits sending the response until the first stream payload arrives, and ends up throwing away response status/header modifications.

What is the new behavior?

The h3 handler response is deferred again until the first renderToStream payload with response status/headers arrives. This is accomplished with the iterable h3 utility. h3 added back the functionality to wait for the first stream payload in h3js/h3#1512 as part of v2.0.1-rc.26.

h3 v2.0.1-rc.26 also fixed some other oddities with headers, which in return broke our header workarounds - in particular the test should preserve multiple Set-Cookie headers on redirect (RFC 6265). With all of the header fixes introduced in the past couple h3 releases, all our header workarounds seem to be not necessary anymore. Our tests now pass without produceResponseWithEventHeaders (which included the workarounds).

This PR also slightly overhauls the should preserve multiple Set-Cookie headers on redirect (RFC 6265) test asserts, so that they result in more understandable error messages in case of a fail.

Other information

Refs: #2229, h3js/h3#1510

@netlify

netlify Bot commented Jul 24, 2026

Copy link
Copy Markdown

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

Name Link
🔨 Latest commit ab1f90d
🔍 Latest deploy log https://app.netlify.com/projects/solid-start-landing-page/deploys/6a64ffcc3b4b2a0008f53f06
😎 Deploy Preview https://deploy-preview-2231--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 Jul 24, 2026

Copy link
Copy Markdown

Open in StackBlitz

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

commit: ab1f90d

@katywings
katywings force-pushed the fix-2229-await-stream-shell-payload branch 2 times, most recently from 299dcf2 to c40ffb1 Compare July 24, 2026 12:53
@changeset-bot

changeset-bot Bot commented Jul 24, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ab1f90d

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

Comment thread packages/start/src/server/handler.ts Outdated
@katywings
katywings force-pushed the fix-2229-await-stream-shell-payload branch 4 times, most recently from 0065376 to 34e3269 Compare July 25, 2026 13:35
@katywings
katywings force-pushed the fix-2229-await-stream-shell-payload branch from 0c72594 to 1863622 Compare July 25, 2026 13:38
@katywings
katywings force-pushed the fix-2229-await-stream-shell-payload branch from 1863622 to 2b3bf6d Compare July 25, 2026 14:01
@katywings
katywings marked this pull request as ready for review July 25, 2026 15:28
@katywings
katywings requested review from brenelz and lxsmnsyc July 25, 2026 15:28
@katywings katywings changed the title WIP: fix: defer handler response until stream shell payload fix: defer handler response until stream shell payload Jul 25, 2026
@birkskyum
birkskyum merged commit b3c7aaf into main Jul 25, 2026
10 checks passed
@birkskyum
birkskyum deleted the fix-2229-await-stream-shell-payload branch July 25, 2026 18:43
brenelz added a commit that referenced this pull request Jul 29, 2026
Brings the v2 rc line (through 2.0.0-rc.6) into the Solid 2 branch.

Ported main features onto the Solid 2 architecture:
- Server-function error handler (#2262): wired through
  handleServerFunctionRequest's transformResult hook and the
  solid-start:server-fn-error-handler virtual module.
- Custom seroval plugins (#2250): serialization.plugins now feeds the
  @solidjs/web codec on both the client transport and the server handler.
- ~ alias fix for workspace packages (#2239): adopted appRootAlias in
  place of the global resolve.alias entry.
- Dev toolbar (#2049, replaces the dev overlay): ported to Solid 2
  (Errored/Loading, onSettled, two-arg createEffect, draft-mutation
  stores, terracotta 2 subpath imports, @solidjs/web Portal/Dynamic/JSX,
  createMemo(async) instead of createResource). Protocol-specific pieces
  (SerovalChunkReader, body-format markers) moved local to the toolbar.
- Deferred stream response via h3 iterable() (#2231), StartHandler type
  (#2234), routerLoad restore (#2228), nonce on streaming redirect
  script (#2252), ResizeObserver-loop filter (#2240) all kept.

Kept deleted (superseded by vite-plugin-solid / @solidjs/web /
@solidjs/router server-function integration): fs-routes tree-shake,
manifest.ts, directives, fns serialization/registration/shared and their
specs. Fixes main landed in those files (#2249, #2238, #2243, #2245,
#2241, #2261) live upstream now and are tracked for porting there.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

4 participants