summaryrefslogtreecommitdiffabout
path: root/cgit.c
Unidiff
Diffstat (limited to 'cgit.c') (more/less context) (show whitespace changes)
-rw-r--r--cgit.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/cgit.c b/cgit.c
index 19adadd..ae20257 100644
--- a/cgit.c
+++ b/cgit.c
@@ -207,4 +207,5 @@ static void prepare_context(struct cgit_context *ctx)
207 ctx->page.modified = time(NULL); 207 ctx->page.modified = time(NULL);
208 ctx->page.expires = ctx->page.modified; 208 ctx->page.expires = ctx->page.modified;
209 ctx->page.etag = NULL;
209} 210}
210 211
@@ -432,4 +433,5 @@ int main(int argc, const char **argv)
432{ 433{
433 const char *cgit_config_env = getenv("CGIT_CONFIG"); 434 const char *cgit_config_env = getenv("CGIT_CONFIG");
435 const char *method = getenv("REQUEST_METHOD");
434 const char *path; 436 const char *path;
435 char *qry; 437 char *qry;
@@ -478,4 +480,6 @@ int main(int argc, const char **argv)
478 ttl = calc_ttl(); 480 ttl = calc_ttl();
479 ctx.page.expires += ttl*60; 481 ctx.page.expires += ttl*60;
482 if (method && !strcmp(method, "HEAD"))
483 ctx.cfg.nocache = 1;
480 if (ctx.cfg.nocache) 484 if (ctx.cfg.nocache)
481 ctx.cfg.cache_size = 0; 485 ctx.cfg.cache_size = 0;