Skip to content

fix(fetch): preserve absent request bodies - #5524

Open
tomasol wants to merge 2 commits into
boa-dev:mainfrom
tomasol:fix/fetch-empty-get-body-upstream
Open

tomasol wants to merge 2 commits into
boa-dev:mainfrom
tomasol:fix/fetch-empty-get-body-upstream

Conversation

@tomasol

@tomasol tomasol commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Currently, bodyless fetch(url, { method: "GET" }) is incorrectly rejected, because an internal empty byte vector is treated as a present body. The patch tracks body presence separately.

@tomasol
tomasol requested a review from a team as a code owner September 14, 2026 10:31
@github-actions github-actions Bot added Waiting On Review Waiting on reviews from the maintainers C-Tests Issues and PRs related to the tests. C-Runtime Issues and PRs related to Boa's runtime features and removed Waiting On Review Waiting on reviews from the maintainers labels Sep 14, 2026
@github-actions github-actions Bot added this to the v0.23 milestone Sep 14, 2026
@github-actions

github-actions Bot commented Sep 14, 2026

Copy link
Copy Markdown

Test262 conformance changes

Test result main count PR count difference
Total 53,578 53,578 0
Passed 51,439 51,439 0
Ignored 1,648 1,648 0
Failed 491 491 0
Panics 0 0 0
Conformance 96.01% 96.01% 0.00%

Tested main commit: 3046147f35985167e2d189b8645493f55311cb9a
Tested PR commit: c164cd420f7d1448abcad59aa6652d4d2dbc13b4
Compare commits: 3046147...c164cd4

@codecov

codecov Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.10%. Comparing base (6ddc2b4) to head (c164cd4).
⚠️ Report is 1059 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #5524       +/-   ##
===========================================
+ Coverage   47.24%   63.10%   +15.86%     
===========================================
  Files         476      536       +60     
  Lines       46892    60314    +13422     
===========================================
+ Hits        22154    38064    +15910     
+ Misses      24738    22250     -2488     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread core/runtime/src/fetch/mod.rs Outdated
let mut signal = signal;

let request: Request<Vec<u8>> = match resource {
let (request, input_has_body): (Request<Vec<u8>>, bool) = match resource {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we have something like Request<Option<Vec<u8>>>? If the semantics of an empty body and no body are different, we should try to represent that in the request itself.

@jedel1043 jedel1043 added the Waiting On Author Waiting on PR changes from the author label Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-Runtime Issues and PRs related to Boa's runtime features C-Tests Issues and PRs related to the tests. Waiting On Author Waiting on PR changes from the author

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants