Repository navigation
fix(upload): bound the proxy body buffer to one upload request; give the update check 30 s - #326
RoyaLemonade wants to merge 2 commits into
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 52 minutes. View limit details
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 |
Code Review Roast 🔥Verdict: No Issues Found | Recommendation: Merge Oh wait, this PR is actually clean. I need to sit down. I had my flamethrower warmed up and everything. 📊 Overall: Like finding a unicorn in production — I didn't think clean PRs existed anymore, but here we are. Files Reviewed (9 files)
Reviewed by free · Input: 50.9K · Output: 2K · Cached: 192.5K |
|
The Bun server/daemon architecture has landed on |
|
Superseded by #411, which carries the same change as a Bun-server PR against current The new PR keeps the scope of this one, with its own tests and a description of what changed. Closing this in favour of it. |
500 "Failed to parse body as FormData."because Next'sexperimental.proxyClientMaxBodySizedefaults to 10 MB and the proxy buffers every request bodybefore it can answer 401. The limit now covers exactly one upload request (the route's 25 MB
per-file cap plus 1 MiB of multipart framing) and is derived from shared constants in
lib/upload-limits.ts, so it cannot grow with the selection. The web uploader sends a largerselection as batches of at most one request's worth (
batchUploadFiles), so a 100 MB selectionstill uploads - as several requests - and the route's own 25 MB/100 MB checks stay authoritative
and answer a clean 413 inside the buffer. A contract test keeps the proxy limit, the route's
checks, the uploader and the constants in lockstep.
omp update --checktakes ~18 s on a cold start (Node CLI startup plus network); the 15 s timeoutmade Settings show "The OMP update could not be started". Raised to 30 s.
Tests:
lib/upload-limits.test.mjs,lib/api-contract.test.mjs.Context: the native Android client (separate PR to follow) uploads files through the same route and
was the reason this showed up; nothing in this PR is Android-specific.