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:
Yorgos Saslis
2026-12-01 16:30:56 +01:00
committed by Rūdolfs Ošiņš
co-authored by Rūdolfs Ošiņš
parent 96bdcb03a6
commit 693ce8661d
3 changed files with 248 additions and 79 deletions
+7
View File
@@ -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`