cgit

commit 1a2eeb94d42b983213076906eb5c5b85452b2c30

Author: Janus <ysangkok@gmail.com>

Add Etags for snapshots

 ui-snapshot.c | 1 +


diff --git a/ui-snapshot.c b/ui-snapshot.c
index ea77eb48c03f640891f7d56cdcbe027d8ba86a23..cb34f4b59c84cc61aeef210095bec9118537524a 100644
--- a/ui-snapshot.c
+++ b/ui-snapshot.c
@@ -119,6 +119,7 @@ 	if (!lookup_commit_reference(sha1)) {
 		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();