From 8185a40185fc81d5825e636180bf77186dff15a1 Mon Sep 17 00:00:00 2001 From: KatolaZ Date: Fri, 29 Mar 2019 23:02:05 +0000 Subject: removed http_headers if repos are not present --- cgit-70.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/cgit-70.c b/cgit-70.c index 714ac1c..ba1396a 100644 --- a/cgit-70.c +++ b/cgit-70.c @@ -587,12 +587,14 @@ static int prepare_repo_cmd(int nongit) ctx.page.title = fmtalloc("%s - %s", ctx.cfg.root_title, "config error"); ctx.repo = NULL; - cgit_print_http_headers(); + /* cgit_print_http_headers(); cgit_print_docstart(); cgit_print_pageheader(); cgit_print_error("Failed to open %s: %s", name, rc ? strerror(rc) : "Not a valid git repository"); - cgit_print_docend(); + cgit_print_docend();*/ + ctx.page.title = "cgit error"; + cgit_gopher_error("Config error -- Invalid repository"); return 1; } ctx.page.title = fmtalloc("%s - %s", ctx.repo->name, ctx.repo->desc); @@ -606,7 +608,7 @@ static int prepare_repo_cmd(int nongit) } if (!ctx.qry.head) { - cgit_print_http_headers(); + /* cgit_print_http_headers(); cgit_print_docstart(); cgit_print_pageheader(); cgit_print_error("Repository seems to be empty"); @@ -616,7 +618,9 @@ static int prepare_repo_cmd(int nongit) cgit_add_clone_urls(print_no_repo_clone_urls); html("\n"); } - cgit_print_docend(); + cgit_print_docend();*/ + ctx.page.title = "cgit error"; + cgit_gopher_error("Repository seems to be empty"); return 1; } -- cgit v1.2.3