Repository navigation
fix(collect): keep the request under the server's 10 MB limit - #14
Merged
Merged
Conversation
…ping the largest inline attachments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
qf collectno longer sends a request the server is certain to reject.Before: parsers cap inline (non-image) attachments in decoded bytes per parsed file (1 MiB each, 8 MiB per file). On the wire, attachments are base64, about a third larger, and one collect can merge several files. So a run could still assemble a body over /collect's 10 MB limit. The server answered with a 413 and the whole launch was lost; qf only printed a warning beforehand.
Now:
The parsers' own budgets are unchanged; this is the final net, in one place, for every parser. A small launch is sent byte-identically. Dry runs are unaffected, since they never offload images.
Tests:
TestBodyLimit_*covers drop order, a small launch staying untouched, results alone over the limit, and dry runs, plus the adapter test that pins the wire encoding.Known follow-ups from review (minor): the "results too large" error is raised after video and screenshot uploads rather than before them; and drop warnings still print on that error path.