Skip to content

Commit 5dcda3c

Browse files
committed
update
1 parent 89ee441 commit 5dcda3c

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/routes/solid-start/building-your-application/data-fetching.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,8 @@ Otherwise, it redirects the user to the login page.
4343
All of these operations are performed completely on the server regardless of how the query is called.
4444

4545
:::caution[Modifying headers after streaming]
46-
Once a response starts streaming, its headers (including the status code and cookies) are immediately sent to the client and **cannot be modified**.
47-
48-
Any server-side operation that changes headers, such as performing a redirect (`3xx` status) or using APIs like `useSession` that modify cookies, must happen **before** streaming begins.
49-
Otherwise, you'll encounter errors like:
46+
Once streaming begins, response headers (including status and cookies) are sent and cannot be changed.
47+
Any header-modifying logic within a server function, such as redirects or APIs like `useSession` that set cookies, must run before streaming starts, or this error will occur:
5048

5149
**"Cannot set headers after they are sent to the client."**
5250

0 commit comments

Comments
 (0)