summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cgi.c8
-rw-r--r--man.cgi.85
2 files changed, 2 insertions, 11 deletions
diff --git a/cgi.c b/cgi.c
index eebb7b41..03426986 100644
--- a/cgi.c
+++ b/cgi.c
@@ -79,7 +79,6 @@ static void resp_searchform(const struct req *);
static void resp_show(const struct req *, const char *);
static const char *scriptname; /* CGI script name */
-static const char *httphost; /* hostname used in the URIs */
static const int sec_prios[] = {1, 4, 5, 8, 6, 3, 7, 2, 9};
static const char *const sec_numbers[] = {
@@ -530,8 +529,8 @@ pg_searchres(const struct req *req, struct manpage *r, size_t sz)
* without any delay.
*/
printf("Status: 303 See Other\r\n");
- printf("Location: http://%s%s/%s/%s?",
- httphost, scriptname, req->q.manpath, r[0].file);
+ printf("Location: %s/%s/%s?",
+ scriptname, req->q.manpath, r[0].file);
http_printquery(req);
printf("\r\n"
"Content-Type: text/html; charset=utf-8\r\n"
@@ -907,9 +906,6 @@ main(void)
if (NULL == (scriptname = getenv("SCRIPT_NAME")))
scriptname = "";
- if (NULL == (httphost = getenv("HTTP_HOST")))
- httphost = "localhost";
-
/*
* First we change directory into the MAN_DIR so that
* subsequent scanning for manpath directories is rooted
diff --git a/man.cgi.8 b/man.cgi.8
index 9539a43e..624e0207 100644
--- a/man.cgi.8
+++ b/man.cgi.8
@@ -266,11 +266,6 @@ is supported as an alias for
The web server may pass the following CGI variables to
.Nm :
.Bl -tag -width Ds
-.It Ev HTTP_HOST
-The FQDN of the (possibly virtual) host the HTTP server is running on.
-This is used for
-.Ic Location:
-headers in HTTP 303 responses.
.It Ev PATH_INFO
The final part of the URI path passed from the client to the server,
starting after the