-
Notifications
You must be signed in to change notification settings - Fork 27k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix broken HTML inlining of non UTF-8 decodable binary data from Flig…
…ht payload (#65664) This PR ensures that any arbitrary binary data can be passed across the RSC boundary, especially when inlined in HTML. While the Flight payloads in RSC requests (`text/x-component`) already work, it's a different case when we inline them directly in HTML as that's required to be a valid string in UTF-8. So instead of always inlining the UTF-8 decoded chunk (`new TextDecoder('utf-8')`), we fallback non-decodable chunks to base64 and send as a special item in `__next_f` so we can safely change it back to a binary typed array. --------- Co-authored-by: JJ Kasper <[email protected]>
- Loading branch information
Showing
15 changed files
with
344 additions
and
76 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
Oops, something went wrong.