]> git.cameronkatri.com Git - cgit.git/commitdiff
Add Etags for snapshots
authorJanus <ysangkok@gmail.com>
Sat, 17 Jan 2015 13:54:31 +0000 (14:54 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Wed, 28 Jan 2015 12:42:49 +0000 (13:42 +0100)
ui-snapshot.c

index ea77eb48c03f640891f7d56cdcbe027d8ba86a23..cb34f4b59c84cc61aeef210095bec9118537524a 100644 (file)
@@ -119,6 +119,7 @@ static int make_snapshot(const struct cgit_snapshot_format *format,
                cgit_print_error("Not a commit reference: %s", hex);
                return 1;
        }
+       ctx.page.etag = sha1_to_hex(sha1);
        ctx.page.mimetype = xstrdup(format->mimetype);
        ctx.page.filename = xstrdup(filename);
        cgit_print_http_headers();