mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-12-02 19:40:35 +08:00
httpd: Cap inlined blob size in commit and diff
The commit and diff endpoints inlined every changed blob in `files`, so a commit with large files grew the response, and httpd's memory, with it. Blobs are now inlined only up to 512 KiB each and 8 MiB per response, with sizes read from object headers so skipped blobs are never loaded. Both sides of a file are inlined or neither, and the explorer shows skipped files without syntax highlighting. Co-authored-by: Rūdolfs Ošiņš <rudolfs@osins.org>
This commit is contained in:
co-authored by
Rūdolfs Ošiņš
parent
96bdcb03a6
commit
693ce8661d
@@ -32,6 +32,13 @@ Explorer supports httpd 0.28.0 and newer, set by `minimumSupportedVersion` in
|
||||
|
||||
## Unreleased
|
||||
|
||||
### Bounded diffs
|
||||
|
||||
- Changed in place: `files` in the commit and diff responses leaves out blobs
|
||||
over 512 KiB, and blobs once the response holds 8 MiB of them. Both sides of a
|
||||
file are left out together. Older clients already handle a missing blob.
|
||||
- Read by: client.
|
||||
|
||||
## 0.31.0
|
||||
|
||||
### API at `/api`
|
||||
|
||||
Reference in New Issue
Block a user