]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-snapshot.c
Add struct cgit_page to cgit_context
[ps-cgit] / ui-snapshot.c
index dfedd8f490f344f06c2fb665c3af5e33b5239466..444980369df9318701ec1f6e5e6dd7930b17900d 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include "cgit.h"
+#include "html.h"
 
 static int write_compressed_tar_archive(struct archiver_args *args,const char *filter)
 {
@@ -100,7 +101,9 @@ void cgit_print_snapshot(struct cacheitem *item, const char *head,
                args.base = fmt("%s/", prefix);
                args.tree = commit->tree;
                args.time = commit->date;
-               cgit_print_snapshot_start(sat->mimetype, filename, item);
+               ctx.page.mimetype = xstrdup(sat->mimetype);
+               ctx.page.filename = xstrdup(filename);
+               cgit_print_http_headers(&ctx);
                (*sat->write_func)(&args);
                return;
        }