-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: handling http response headers (#106)
Moves route matching and route component loading into middleware when using the file-system based router to remove async implementation in the React Server Component entrypoint of the router. Changes RSC payload handling to use the same approach as in the HTML SSR renderer to handle async components better. Introduces a rendering lock mechanism to suspend sending the response to be able to handle response headers in async components until the lock is released. Refactors HTTP response header handling to use `Headers` directly and introduces helper functions to set, append, delete, or clear response headers in the HTTP context. Fixes an issue with accessing the `Response` sent to the client when using `useResponse` in an async React Server Component. Adds test cases for above changes and updates the docs to include the new helpers and to give more details about how to handle response headers. #100
- Loading branch information
Showing
18 changed files
with
524 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.