aboutsummaryrefslogtreecommitdiffstats
path: root/ui-snapshot.c
diff options
context:
space:
mode:
authorJanus2015-01-17 14:54:31 +0100
committerJason A. Donenfeld2015-01-28 13:42:49 +0100
commit1a2eeb94d42b983213076906eb5c5b85452b2c30 (patch)
tree71ae7a61ae04fdaeaa7e2d811981a1397a6a9ebe /ui-snapshot.c
parentc422b9b3d5938a4d386533604d4c0dbedfcb2b6d (diff)
downloadcgit-1a2eeb94d42b983213076906eb5c5b85452b2c30.tar.gz
cgit-1a2eeb94d42b983213076906eb5c5b85452b2c30.tar.bz2
cgit-1a2eeb94d42b983213076906eb5c5b85452b2c30.zip
Add Etags for snapshots
Diffstat (limited to 'ui-snapshot.c')
-rw-r--r--ui-snapshot.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ui-snapshot.c b/ui-snapshot.c
index ea77eb4..cb34f4b 100644
--- a/ui-snapshot.c
+++ b/ui-snapshot.c
@@ -119,6 +119,7 @@ static int make_snapshot(const struct cgit_snapshot_format *format,
119 cgit_print_error("Not a commit reference: %s", hex); 119 cgit_print_error("Not a commit reference: %s", hex);
120 return 1; 120 return 1;
121 } 121 }
122 ctx.page.etag = sha1_to_hex(sha1);
122 ctx.page.mimetype = xstrdup(format->mimetype); 123 ctx.page.mimetype = xstrdup(format->mimetype);
123 ctx.page.filename = xstrdup(filename); 124 ctx.page.filename = xstrdup(filename);
124 cgit_print_http_headers(); 125 cgit_print_http_headers();