summaryrefslogtreecommitdiffabout
path: root/ui-shared.c
Unidiff
Diffstat (limited to 'ui-shared.c') (more/less context) (ignore whitespace changes)
-rw-r--r--ui-shared.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/ui-shared.c b/ui-shared.c
index 3322561..172499c 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -141,6 +141,17 @@ void cgit_print_pageheader(char *title, int show_search)
141 htmlf("<a href='%s'>", cgit_repourl(cgit_query_repo)); 141 htmlf("<a href='%s'>", cgit_repourl(cgit_query_repo));
142 html_txt(title); 142 html_txt(title);
143 if (cgit_query_repo) 143 if (cgit_query_repo)
144 html("</a>"); 144 html("</a>");
145 html("</td></tr><tr><td id='content'>"); 145 html("</td></tr><tr><td id='content'>");
146} 146}
147
148void cgit_print_snapshot_start(const char *mimetype, const char *filename,
149 struct cacheitem *item)
150{
151 htmlf("Content-Type: %s\n", mimetype);
152 htmlf("Content-Disposition: inline; filename=\"%s\"\n", filename);
153 htmlf("Last-Modified: %s\n", http_date(item->st.st_mtime));
154 htmlf("Expires: %s\n", http_date(item->st.st_mtime +
155 ttl_seconds(item->ttl)));
156 html("\n");
157}