fix(fetch): handle BufferSource bodies in Response#5217
Open
iammdzaidalam wants to merge 1 commit intoboa-dev:mainfrom
Open
fix(fetch): handle BufferSource bodies in Response#5217iammdzaidalam wants to merge 1 commit intoboa-dev:mainfrom
iammdzaidalam wants to merge 1 commit intoboa-dev:mainfrom
Conversation
Test262 conformance changes
Fixed tests (6):Tested main commit: |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5217 +/- ##
===========================================
+ Coverage 47.24% 59.83% +12.59%
===========================================
Files 476 582 +106
Lines 46892 63485 +16593
===========================================
+ Hits 22154 37988 +15834
- Misses 24738 25497 +759 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
Hey @jedel1043, any updates here when you get a moment? |
Contributor
Author
|
hey @jedel1043 @nekevss ,any updates when u get a moment? |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #5216
Adds BufferSource handling to the
Response()constructor body extraction path.Currently, inputs like
Uint8ArrayorDataViewfall through to stringification,so binary bodies end up as strings (e.g.
"[object Uint8Array]") instead of raw bytes.This change:
ArrayBuffer, typed arrays, andDataViewDataViewinputs usingbyteOffset/byteLengthusize::try_from(...)for offsets/lengths to avoid truncation on 32-bit targetsBodyInittypes (e.g.Blob,FormData) for follow-upTesting
Added tests in
core/runtime/src/fetch/tests/response.rscovering:ArrayBufferUint8ArrayDataViewwith non-zero offset/lengthNotes
Content-Typetext/plain;charset=UTF-8