]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-shared.c
Add support for ETag in 'plain' view
[ps-cgit] / ui-shared.c
index 4f2851273418dc9a81c4af942660e4923a149f5e..86a7d29cbc7263c2614229ed7909790eacb884a8 100644 (file)
@@ -468,6 +468,8 @@ void cgit_print_http_headers(struct cgit_context *ctx)
                      ctx->page.filename);
        htmlf("Last-Modified: %s\n", http_date(ctx->page.modified));
        htmlf("Expires: %s\n", http_date(ctx->page.expires));
+       if (ctx->page.etag)
+               htmlf("ETag: \"%s\"\n", ctx->page.etag);
        html("\n");
 }
 
@@ -500,6 +502,8 @@ void cgit_print_docstart(struct cgit_context *ctx)
        }
        html("</head>\n");
        html("<body>\n");
+       if (ctx->cfg.header)
+               html_include(ctx->cfg.header);
 }
 
 void cgit_print_docend()