Duplicates
Latest version
Current behavior 😯
Setting the response status code with <HttpStatusCode code={404} /> after waiting for some query data with deferStream: true, stopped working with Start v2. It instead just responds with 200. The same regression probably applies to <HttpHeader>.
Expected behavior 🤔
The response status code should be properly sended, even if <HttpStatusCode code={404} /> is server-rendered late with deferStream: true.
Steps to reproduce 🕹
- Set the following as content of
src/routes/[...404].tsx:
import { Title } from "@solidjs/meta";
import { createAsync, query } from "@solidjs/router";
import { HttpStatusCode } from "@solidjs/start";
import { Show } from "solid-js";
const getData = query(async () => "test", "data");
export default function NotFound() {
const data = createAsync(() => getData(), { deferStream: true });
return (
<main>
{data()}
<Title>Not Found</Title>
<Show when={data()}>
<HttpStatusCode code={404} />
</Show>
<h1>Page Not Found</h1>
<p>
Visit{" "}
<a href="https://start.solidjs.com" target="_blank">
start.solidjs.com
</a>{" "}
to learn how to build SolidStart apps.
</p>
</main>
);
}
- Open http://localhost:3000/notfound
- Check the status code
Context 🔦
No response
Your environment 🌎
- node: v24.18
- Start: ^2.0.0-rc.1
Duplicates
Latest version
Current behavior 😯
Setting the response status code with
<HttpStatusCode code={404} />after waiting for somequerydata withdeferStream: true, stopped working with Start v2. It instead just responds with 200. The same regression probably applies to<HttpHeader>.Expected behavior 🤔
The response status code should be properly sended, even if
<HttpStatusCode code={404} />is server-rendered late withdeferStream: true.Steps to reproduce 🕹
src/routes/[...404].tsx:Context 🔦
No response
Your environment 🌎