summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatolaZ <katolaz@freaknet.org>2019-03-29 23:02:05 +0000
committerKatolaZ <katolaz@freaknet.org>2019-03-29 23:02:05 +0000
commit8185a40185fc81d5825e636180bf77186dff15a1 (patch)
treebe5ff69e24a743815ac2f07dca9ff42d815939d3
parent7fd094820d26cade130638a57847f20acb4ebe62 (diff)
removed http_headers if repos are not present
-rw-r--r--cgit-70.c12
1 files 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("</table>\n");
}
- cgit_print_docend();
+ cgit_print_docend();*/
+ ctx.page.title = "cgit error";
+ cgit_gopher_error("Repository seems to be empty");
return 1;
}