summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2016-04-14 23:48:07 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2016-04-14 23:48:07 +0000
commit7e63e16eb68865eb509242bc235ee86da31f6cef (patch)
tree838f2d8e17af8bced84ccc983802daa79da7374b /usr.bin
parentdef57f71151deb8e79cbf9b874130a198054b097 (diff)
for .Xr links, use short PATH_INFO style URIs
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/mandoc/cgi.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/usr.bin/mandoc/cgi.c b/usr.bin/mandoc/cgi.c
index aa6f6d0a3b2..934ca5819f0 100644
--- a/usr.bin/mandoc/cgi.c
+++ b/usr.bin/mandoc/cgi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cgi.c,v 1.60 2016/04/14 20:38:50 schwarze Exp $ */
+/* $OpenBSD: cgi.c,v 1.61 2016/04/14 23:48:06 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014, 2015, 2016 Ingo Schwarze <schwarze@usta.de>
@@ -814,12 +814,8 @@ format(const struct req *req, const char *file)
memset(&conf, 0, sizeof(conf));
conf.fragment = 1;
usepath = strcmp(req->q.manpath, req->p[0]);
- mandoc_asprintf(&conf.man, "/%s?query=%%N&sec=%%S%s%s%s%s",
- scriptname,
- req->q.arch ? "&arch=" : "",
- req->q.arch ? req->q.arch : "",
- usepath ? "&manpath=" : "",
- usepath ? req->q.manpath : "");
+ mandoc_asprintf(&conf.man, "/%s%s%%N.%%S",
+ usepath ? req->q.manpath : "", usepath ? "/" : "");
mparse_result(mp, &man, NULL);
if (man == NULL) {