AgeCommit message (Collapse)AuthorLines
Lock a cache slot with flockBryce Kwon-0/+38
The slot lock was a POSIX record lock, which a process loses the moment any descriptor on the file closes, and the fill puts the lock file on stdout, which every exec filter and snapshot compressor closes with its dup2. A second request on the slot could then rebuild it under the first and splice the two pages. An flock holds until the last descriptor goes.
Abandon a fill whose last flush fails to writeBryce Kwon-0/+16
The slot being filled was forgotten before the page's final flush, so a write that failed there, on a full disk for one, could not abandon the fill: cgit died into the lock file instead and the visitor got nothing. The mid-page path already delivered the page from the lock file.
Compare the cached page with the uncached one wholeBryce Kwon-5/+1
The footer lost the time it was generated at in 2018, and both runs come from the same binary, so the two pages have nothing to differ in.
Cache every branch page under cache-dynamic-ttlBryce Kwon-0/+19
The dynamic ttl only applied when the url named a branch with h=, so the log, tree and refs of the default branch, which never carry one, fell back to cache-summary-ttl. The manual already gives each ttl the scope the code now uses.
Keep clone files and oversized responses out of the cacheBryce Kwon-0/+43
The dumb transport reads files that already sit on the disk, so a pack copied into a slot cost that disk twice and the request a second write of every byte. A snapshot took a slot whatever its size, so a visitor naming distinct refs and ids could fill the cache root with archives. `cache-max-slot-size`, 64 MB unless set, now serves a larger response from the lock file and drops it, along with any expired copy it would have replaced.
Test the hardening passBryce Kwon-5/+4
Clean up the whole treeBryce Kwon-4/+2
Trim the comments and dead code across the treeBryce Kwon-6/+4
Deduplicate the cache test request listsBryce Kwon-48/+25
Renumber the test scripts into themed rangesBryce Kwon-0/+200
t000x the ground the suite stands on: git version, html validity, the cache t01xx page content, one script per page t02xx features that cut across pages: filters, submodule links, dates, limits t03xx defence, the security regressions and the $HOME promise t04xx the helper tools under tools/