diff options
Diffstat (limited to 'cgi.c')
-rw-r--r-- | cgi.c | 16 |
1 files changed, 4 insertions, 12 deletions
@@ -1,4 +1,4 @@ -/* $Id: cgi.c,v 1.133 2016/07/09 19:58:36 schwarze Exp $ */ +/* $Id: cgi.c,v 1.134 2016/07/10 10:05:33 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2014, 2015, 2016 Ingo Schwarze <schwarze@usta.de> @@ -470,9 +470,6 @@ validate_manpath(const struct req *req, const char* manpath) { size_t i; - if ( ! strcmp(manpath, "mandoc")) - return 1; - for (i = 0; i < req->psz; i++) if ( ! strcmp(manpath, req->p[i])) return 1; @@ -499,9 +496,9 @@ pg_index(const struct req *req) resp_searchform(req, FOCUS_QUERY); printf("<p>\n" "This web interface is documented in the\n" - "<a href=\"/%s%smandoc/man8/man.cgi.8\">man.cgi</a>\n" + "<a href=\"/%s%sman.cgi.8\">man.cgi(8)</a>\n" "manual, and the\n" - "<a href=\"/%s%smandoc/man1/apropos.1\">apropos</a>\n" + "<a href=\"/%s%sapropos.1\">apropos(1)</a>\n" "manual explains the query syntax.\n" "</p>\n", scriptname, *scriptname == '\0' ? "" : "/", @@ -884,12 +881,7 @@ pg_show(struct req *req, const char *fullpath) free(manpath); return; } - - if (strcmp(manpath, "mandoc")) { - free(req->q.manpath); - req->q.manpath = manpath; - } else - free(manpath); + free(manpath); if ( ! validate_filename(file)) { pg_error_badrequest( |