]> granicus.if.org Git - cgit/commitdiff
Use TTL-settings even in nocache mode
authorLars Hjemli <larsh@hal-2004.(none)>
Fri, 5 Jan 2007 17:18:58 +0000 (18:18 +0100)
committerLars Hjemli <larsh@hal-2004.(none)>
Fri, 5 Jan 2007 17:18:58 +0000 (18:18 +0100)
In nocace mode an uninitialized ttl-setting was used to generate http-Expires
header. Fix it.

Signed-off-by: Lars Hjemli <larsh@hal-2004.(none)>
cgit.c

diff --git a/cgit.c b/cgit.c
index fba97d7277ffc881136152c2a009533ecede07a1..5dcba768f0baefe15196053799c0d53b498b126e 100644 (file)
--- a/cgit.c
+++ b/cgit.c
@@ -153,6 +153,7 @@ int main(int argc, const char **argv)
        cgit_parse_query(cgit_querystring, cgit_querystring_cb);
 
        if (cgit_nocache) {
+               cache_prepare(&item);
                item.fd = STDOUT_FILENO;
                cgit_fill_cache(&item);
        } else {