summaryrefslogtreecommitdiffabout
path: root/cgit.c
Unidiff
Diffstat (limited to 'cgit.c') (more/less context) (ignore whitespace changes)
-rw-r--r--cgit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cgit.c b/cgit.c
index ac882c3..0deae12 100644
--- a/cgit.c
+++ b/cgit.c
@@ -139,16 +139,18 @@ static void querystring_cb(const char *name, const char *value)
139 ctx.qry.sha2 = xstrdup(value); 139 ctx.qry.sha2 = xstrdup(value);
140 ctx.qry.has_sha1 = 1; 140 ctx.qry.has_sha1 = 1;
141 } else if (!strcmp(name, "ofs")) { 141 } else if (!strcmp(name, "ofs")) {
142 ctx.qry.ofs = atoi(value); 142 ctx.qry.ofs = atoi(value);
143 } else if (!strcmp(name, "path")) { 143 } else if (!strcmp(name, "path")) {
144 ctx.qry.path = trim_end(value, '/'); 144 ctx.qry.path = trim_end(value, '/');
145 } else if (!strcmp(name, "name")) { 145 } else if (!strcmp(name, "name")) {
146 ctx.qry.name = xstrdup(value); 146 ctx.qry.name = xstrdup(value);
147 } else if (!strcmp(name, "mimetype")) {
148 ctx.qry.mimetype = xstrdup(value);
147 } 149 }
148} 150}
149 151
150static void prepare_context(struct cgit_context *ctx) 152static void prepare_context(struct cgit_context *ctx)
151{ 153{
152 memset(ctx, 0, sizeof(ctx)); 154 memset(ctx, 0, sizeof(ctx));
153 ctx->cfg.agefile = "info/web/last-modified"; 155 ctx->cfg.agefile = "info/web/last-modified";
154 ctx->cfg.nocache = 0; 156 ctx->cfg.nocache = 0;