diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Drop the Last-Modified, Expires and ETag headers
Diffstat (limited to 'source/ui-shared.c')
| -rw-r--r-- | source/ui-shared.c | 19 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 0 insertions, 19 deletions
diff --git a/source/ui-shared.c b/source/ui-shared.c index 12df3b2..74c1c48 100644 --- a/source/ui-shared.c +++ b/source/ui-shared.c @@ -315,20 +315,6 @@ static void print_rel_date(time_t t, int tz, double count, const char *class, htmlf("'>%.0f %s</time>", count, suffix); } -static char *http_date(time_t t) -{ - static char day[][4] = - {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}; - static char month[][4] = - {"Jan", "Feb", "Mar", "Apr", "May", "Jun", - "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; - struct tm tm; - gmtime_r(&t, &tm); - return cgit_fmt("%s, %02d %s %04d %02d:%02d:%02d GMT", day[tm.tm_wday], - tm.tm_mday, month[tm.tm_mon], 1900 + tm.tm_year, - tm.tm_hour, tm.tm_min, tm.tm_sec); -} - static void print_rel_vcs_link(const char *url) { html("<link rel='vcs-git' href='"); @@ -1119,10 +1105,6 @@ void cgit_print_http_headers(void) } if (!ctx.env.authenticated) html("Cache-Control: no-cache, no-store\n"); - 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"); // Some pages follow the headers with output written by git itself, not // through html_raw, so the buffer is emptied to keep the headers first. @@ -1244,7 +1226,6 @@ void cgit_print_error_page(int code, const char *msg, const char *fmt, ...) void cgit_vprint_error_page(int code, const char *msg, const char *fmt, va_list ap) { - ctx.page.expires = ctx.cfg.cache_dynamic_ttl; ctx.page.status = code; ctx.page.statusmsg = msg; cgit_print_layout_start(); |
