-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[browser][coreCLR] fix streaming instatiation for NodeJS #123332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
pavelsavara
commented
Jan 18, 2026
- use real Response class when possible
|
Tagging subscribers to this area: @agocke, @jeffschwMSFT, @elinor-fung |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes streaming instantiation for Node.js by introducing a responseLike helper function that uses the real Response class when available, and provides appropriate Content-Type headers for assets to enable proper WebAssembly streaming.
Changes:
- Introduced a
responseLikefunction that uses the nativeResponseconstructor when available, with proper fallback for environments without it - Added
expectedContentTypeparameter tofetchLikeand thread it through to responses for proper WASM Content-Type headers - Created
behaviorToContentTypeMapto map asset behaviors to their MIME types - Renamed
runtimeToBlazorAssetTypeMaptobehaviorToBlazorAssetTypeMapfor better naming consistency
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| src/native/corehost/browserhost/loader/polyfills.ts | Added responseLike helper function, updated fetchLike to accept and use expectedContentType, refactored response creation to use the helper |
| src/native/corehost/browserhost/loader/assets.ts | Added behaviorToContentTypeMap, renamed asset type mapping for consistency, updated loadResourceFetch to use content types and responseLike |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
/ba-g known issues |