diff options
author | KatolaZ <katolaz@freaknet.org> | 2019-03-29 23:02:05 +0000 |
---|---|---|
committer | KatolaZ <katolaz@freaknet.org> | 2019-03-29 23:02:05 +0000 |
commit | 8185a40185fc81d5825e636180bf77186dff15a1 (patch) | |
tree | be5ff69e24a743815ac2f07dca9ff42d815939d3 /cgit-70.c | |
parent | 7fd094820d26cade130638a57847f20acb4ebe62 (diff) |
removed http_headers if repos are not present
Diffstat (limited to 'cgit-70.c')
-rw-r--r-- | cgit-70.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -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; } |