)]}'
{
  "commit": "156e859aad4c98a169ce4c49e839cae41a28f432",
  "tree": "04ebccf8c33913c76bef980ffe405d7164f7249c",
  "parents": [
    "599e3df55ff0ce7387172c16cba269d545019ed3"
  ],
  "author": {
    "name": "Konstantin Ryabitsev",
    "email": "konstantin@linuxfoundation.org",
    "time": "Tue Aug 25 15:07:25 2026 +0000"
  },
  "committer": {
    "name": "Jason A. Donenfeld",
    "email": "Jason@zx2c4.com",
    "time": "Fri Sep 18 13:51:15 2026 +0200"
  },
  "message": "ui-shared: fix the Expires header on error pages\n\npage.expires is an absolute time: the normal path seeds it from\npage.modified and adds the relevant TTL in seconds. The error page\ninstead assigns cache-dynamic-ttl directly, which is a count of minutes\nand carries no base, so every error page cgit has produced since\n\"ui-shared: cache errors for dynamic TTL\" reports\n\n  Expires: Thu, 01 Jan 1970 00:00:05 GMT\n\nfive seconds past the epoch, which is the value of the default TTL read\nas seconds. The intent of that change was to stop errors being cached\nforever; the effect is that they are never cached at all, since every\ndownstream cache is told the response was already stale.\n\nSeed the value from page.modified and scale the TTL to seconds, matching\nwhat calc_ttl() does for ordinary pages. prepare_context() sets\npage.modified before anything can produce an error page, so the base is\nalways available.\n\nAdd a test. The header can be checked without any date arithmetic: a TTL\nof zero has to reproduce Last-Modified exactly, and a non-zero one has\nto differ from it without falling back to the epoch.\n\nFixes: c5975ae (\"ui-shared: cache errors for \"dynamic TTL\"\")\nSigned-off-by: Konstantin Ryabitsev \u003ckonstantin@linuxfoundation.org\u003e\nSigned-off-by: Jason A. Donenfeld \u003cJason@zx2c4.com\u003e\n",
  "tree_diff": [
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "51fbad85c410373718507142e57093dc5e4be22a",
      "new_mode": 33261,
      "new_path": "tests/t0022-error-page-headers.sh"
    },
    {
      "type": "modify",
      "old_id": "df52a9be29d39b4491128db89cafb92f82653096",
      "old_mode": 33188,
      "old_path": "ui-shared.c",
      "new_id": "44794d8d289dc167068e6ae663333ca9eef95517",
      "new_mode": 33188,
      "new_path": "ui-shared.c"
    }
  ]
}
