fix(images): preserve bodyless responses with size headers - #1386
Conversation
📝 WalkthroughWalkthrough
ChangesImage response handling
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
4d72783 to
9b44acc
Compare
|
✅ Deterministic PR hygiene checks passed. |
✅ READY
Review readiness checklist
✅ 4/4 boxes ticked. This pull request is already Ready for Review. |
Wibias
left a comment
There was a problem hiding this comment.
Reviewed current head 9b44acc. The production change correctly handles a null response body before Content-Length validation, which fixes the bodyless-response false oversize case while preserving the existing abort and bounded-body behavior. Cross-platform CI and React Doctor are green. Non-blocking note: the motivating standards-compliant example is a 304 with Content-Length; the regression uses a 204 with Content-Length, which is a malformed upstream case. The implementation still covers both, so this is not a merge blocker.
|
Thanks @luvs01! 🙏 This is a clean, focused fix for the bodyless image-response edge case. Merged into |
Summary
Follow-up to #1346 (comment).
Verification
bun test tests/server-images.test.ts— 63 passed.bun run typecheck— passed.bun run privacy:scan— passed.git diff --check HEAD^ HEAD— passed.Checklist
Review readiness checklist
All CI tests are green on my local testing.
I pushed my PR to the latest dev commit.
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.
Summary by CodeRabbit