webcore: copy internal state in new Request(request) instead of calling getters - #37033
Open
robobun wants to merge 7 commits into
Open
webcore: copy internal state in new Request(request) instead of calling getters#37033robobun wants to merge 7 commits into
robobun wants to merge 7 commits into
Claude / Claude Code Review
completed
Aug 6, 2026 in 36m 21s
Code review found 1 potential issue
Found 1 candidates, confirmed 1. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 1 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | src/runtime/webcore/Request.rs:1148-1158 |
Disturbed-input check treats {body: null} as no-init-body but body-copy block does not |
Annotations
Check warning on line 1158 in src/runtime/webcore/Request.rs
claude / Claude Code Review
Disturbed-input check treats {body: null} as no-init-body but body-copy block does not
The new disturbed-input check's `|| matches!(req.body_value(), BodyValue::Null)` clause encodes "init contributed no body" for `{body: null}` (so a used input throws — correct per Node/spec), but the body-copy block just below still gates only on `!fields.contains(Fields::Body)` and never tees the input body in that case. So `new Request(usedInput, {body: null})` now throws about an input body that `new Request(freshInput, {body: null})` still silently drops to null — the two paths disagree on w
Loading