fix(body): cancel stream reader when body size limit exceeded#1320
Conversation
isBodySizeWithin cloned the request body to check its size but never cancelled the reader when the limit was exceeded. The uncancelled reader held a reference to the cloned stream, preventing garbage collection for large payloads. Now calls reader.cancel() when the size exceeds the limit, allowing the runtime to release the stream resources immediately. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe change adds a stream cancellation step to the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment |
commit: |
Summary
Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit