Merge branch 'plain-etag'

Conflicts:
	ui-shared.c
This commit is contained in:
Lars Hjemli
2009-07-25 11:59:22 +02:00
کامیت 681fdc4547
4فایلهای تغییر یافته به همراه12 افزوده شده و 0 حذف شده

4
cgit.c
مشاهده پرونده

@ -206,6 +206,7 @@ static void prepare_context(struct cgit_context *ctx)
ctx->page.size = 0;
ctx->page.modified = time(NULL);
ctx->page.expires = ctx->page.modified;
ctx->page.etag = NULL;
}
struct refmatch {
@ -431,6 +432,7 @@ static int calc_ttl()
int main(int argc, const char **argv)
{
const char *cgit_config_env = getenv("CGIT_CONFIG");
const char *method = getenv("REQUEST_METHOD");
const char *path;
char *qry;
int err, ttl;
@ -477,6 +479,8 @@ int main(int argc, const char **argv)
ttl = calc_ttl();
ctx.page.expires += ttl*60;
if (method && !strcmp(method, "HEAD"))
ctx.cfg.nocache = 1;
if (ctx.cfg.nocache)
ctx.cfg.cache_size = 0;
err = cache_process(ctx.cfg.cache_size, ctx.cfg.cache_root,