diff options
-rw-r--r-- | cgit.c | 4 | ||||
-rw-r--r-- | cgit.h | 20 |
2 files changed, 12 insertions, 12 deletions
@@ -401,9 +401,9 @@ static void prepare_context(struct cgit_context *ctx) | |||
401 | ctx->page.etag = NULL; | 401 | ctx->page.etag = NULL; |
402 | memset(&ctx->cfg.mimetypes, 0, sizeof(struct string_list)); | 402 | memset(&ctx->cfg.mimetypes, 0, sizeof(struct string_list)); |
403 | if (ctx->env.script_name) | 403 | if (ctx->env.script_name) |
404 | ctx->cfg.script_name = ctx->env.script_name; | 404 | ctx->cfg.script_name = xstrdup(ctx->env.script_name); |
405 | if (ctx->env.query_string) | 405 | if (ctx->env.query_string) |
406 | ctx->qry.raw = ctx->env.query_string; | 406 | ctx->qry.raw = xstrdup(ctx->env.query_string); |
407 | if (!ctx->env.cgit_config) | 407 | if (!ctx->env.cgit_config) |
408 | ctx->env.cgit_config = CGIT_CONFIG; | 408 | ctx->env.cgit_config = CGIT_CONFIG; |
409 | } | 409 | } |
@@ -255,16 +255,16 @@ struct cgit_page { | |||
255 | }; | 255 | }; |
256 | 256 | ||
257 | struct cgit_environment { | 257 | struct cgit_environment { |
258 | char *cgit_config; | 258 | const char *cgit_config; |
259 | char *http_host; | 259 | const char *http_host; |
260 | char *https; | 260 | const char *https; |
261 | char *no_http; | 261 | const char *no_http; |
262 | char *path_info; | 262 | const char *path_info; |
263 | char *query_string; | 263 | const char *query_string; |
264 | char *request_method; | 264 | const char *request_method; |
265 | char *script_name; | 265 | const char *script_name; |
266 | char *server_name; | 266 | const char *server_name; |
267 | char *server_port; | 267 | const char *server_port; |
268 | }; | 268 | }; |
269 | 269 | ||
270 | struct cgit_context { | 270 | struct cgit_context { |