Repository navigation
Conversation
|
@danielroe is attempting to deploy a commit to the unjs Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Track and apply derived body length src/adapters/_node/response.ts |
NodeResponse stores the derived body length during native Response materialization. _toNodeResponse() applies it only when the body is unused and clears it during cleanup. |
Verify framing and header behavior test/node-adapters.test.ts |
Server tests cover framing for multiple body types, consumed bodies, header comparisons with native Response, and a response rebuilt from read headers. |
Priority:
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix
Possibly related PRs
- h3js/srvx#335: This PR changes the derived-header behavior introduced by that PR.
Merge Risk: 
Minimal · up to bfa40
-
The changed response handling appears ready to merge after normal checks. No unresolved issue is established.
Pre-merge checks: 
5
-
Full details: Docstring Coverage
-
Explanation
No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files.
-
Finishing Touches: 💡 1
-
🛠️ Fix failing CI checks: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
A rabbit checks the length in flight,
And keeps the native headers right.
If body bytes have gone away,
No derived length will join the stay.
Then hops along to test the frame.
Comment @coderabbitai help to get the list of available commands.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
commit: |
content-length on FastResponse` headerscontent-length on FastResponse headers
spotted this in nuxt/nuxt#36671, since nitrojs/nitro#4910 made
FastResponsethe globalResponsefor Node builds.since srvx v1.0.7 and #335, reading the body of a Node
FastResponseadds a derivedcontent-lengthto.headers. nativeResponsedoesn't do this (and neither did v1.0.6), so "read, transform, rebuild with the original headers" now sends the wrong length and the client sees a truncated body:this PR stores the derived length privately instead and only adds it in
_toNodeResponse()...Summary by CodeRabbit